a4784233f0d7ce3d3e224d24301c2af5a10dda80
[platform/upstream/dbus.git] / ChangeLog
1 2003-03-16  Havoc Pennington  <hp@pobox.com>
2
3         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4
5 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
6
7         * bus/activation.c (bus_activation_activate_service): Append
8         the pending activation entry to the list of pending activations.
9
10 2003-03-16  Havoc Pennington  <hp@pobox.com>
11
12         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
13         connections
14
15         * dbus/dbus-address.c (create_entry): fix OOM handling when
16         failing to alloc entry->method
17
18 2003-03-16  Havoc Pennington  <hp@pobox.com>
19
20         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
21         the watch
22
23         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
24         add some missing dbus_set_result
25
26         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to 
27         alloc the DBusMessageHandler
28
29         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
30         the transport here, since we call this from the finalizer; it 
31         resulted in a double-finalize.
32
33         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug 
34         where we tried to use transport->connection that was NULL, 
35         happened when transport was disconnected early on due to OOM
36
37         * bus/*.c: adapt to handle OOM for watches/timeouts
38
39         * dbus/dbus-transport-unix.c: port to handle OOM during 
40         watch handling
41         
42         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
43         reference to unused bytes instead of a copy
44
45         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
46         out of memory
47
48         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
49         FALSE on OOM
50
51         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
52         of memory
53
54 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
55
56         * doc/dbus-specification.sgml:
57         Document reply message for ActivateService.
58         
59 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
60
61         * bus/activation.c: (bus_pending_activation_entry_free),
62         (bus_pending_activation_free), (bus_activation_new),
63         (bus_activation_unref), (bus_activation_service_created),
64         (bus_activation_activate_service):
65         * bus/activation.h:
66         * bus/bus.c: (bus_context_new):
67         * bus/desktop-file.c: (new_section):
68         * bus/driver.c: (bus_driver_send_service_deleted),
69         (bus_driver_handle_activate_service):
70         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
71         * bus/services.h:
72         * dbus/dbus-connection.c:
73         (dbus_connection_send_with_reply_and_block):
74         * dbus/dbus-message.c: (dbus_message_append_args_valist):
75         * dbus/dbus-protocol.h:
76         Make activation work better. Now pending activations will be queued
77         and the daemon won't try to activate services that are already registered.
78         
79 2003-03-16  Havoc Pennington  <hp@pobox.com>
80
81         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
82         connection data
83
84         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
85         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
86
87 2003-03-16  Havoc Pennington  <hp@pobox.com>
88
89         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
90         this. always run the test suite before commit...
91
92         * bus/*: adapt to DBusConnection API changes
93
94         * glib/dbus-gmain.c: adapt to DBusConnection API changes, 
95         requires renaming stuff to avoid dbus_connection_dispatch name 
96         conflict.
97
98         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
99         function
100
101         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
102         separate from _dbus_message_loader_return_buffer()
103
104         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
105         this, because it's now always broken to use; the number of
106         messages in queue vs. the number still buffered by the message
107         loader is undefined/meaningless. Should use
108         dbus_connection_get_dispatch_state().
109         (dbus_connection_dispatch): rename from
110         dbus_connection_dispatch_message
111
112 2003-03-16  Havoc Pennington  <hp@pobox.com>
113
114         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
115         implementation
116
117 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
118
119         * dbus/dbus-connection.c:
120         (dbus_connection_send_with_reply_and_block):
121         Decrease connection->n_incoming when removing an entry 
122         from the list.
123         * dbus/dbus-dict.c: (dbus_dict_entry_free),
124         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
125         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
126         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
127         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
128         (dbus_dict_get_byte_array):
129         Handle NULL arrays and strings. Also add support for byte arrays.
130         
131         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
132         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
133         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
134         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
135         (_dbus_demarshal_dict), (demarshal_and_validate_len),
136         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
137         * dbus/dbus-marshal.h:
138         Add support for marshalling and demarshalling empty arrays and strings.
139         
140         * dbus/dbus-message.c: (dbus_message_append_args_valist),
141         (dbus_message_append_string_array),
142         (dbus_message_iter_get_boolean),
143         (dbus_message_iter_get_boolean_array),
144         (dbus_message_iter_get_int32_array),
145         (dbus_message_iter_get_uint32_array),
146         (dbus_message_iter_get_double_array),
147         (dbus_message_iter_get_byte_array),
148         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
149         (check_message_handling):
150         Add support for getting empty arrays and dicts.
151         
152         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
153         Don't do any validation at all for now, that's better than just checking
154         for ASCII.
155         
156         * test/data/valid-messages/emptiness.message:
157         New test message with lots of empty arrays.
158         
159 2003-03-16  Havoc Pennington  <hp@pobox.com>
160
161         * dbus/dbus-connection.c
162         (_dbus_connection_queue_received_message_link): new function that
163         can't fail due to OOM
164
165         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
166         new function pops a message together with a list link 
167         containing it.
168
169         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
170         message queuing functions to avoid needing to alloc memory
171
172 2003-03-16  Havoc Pennington  <hp@pobox.com>
173
174         Oops - test code was only testing failure of around 30 of the
175         mallocs in the test path, but it turns out there are 500+
176         mallocs. I believe this was due to misguided linking setup such
177         that there was one copy of dbus_malloc etc. in the daemon and one
178         in the shared lib, and only daemon mallocs were tested. In any
179         case, the test case now tests all 500+ mallocs, and doesn't pass
180         yet, though there are lots of fixes in this patch.
181         
182         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
183         this so that it doesn't need to allocate memory, since it 
184         has no way of indicating failure due to OOM (and would be 
185         annoying if it did).
186
187         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
188
189         * bus/Makefile.am: rearrange to create two self-contained
190         libraries, to avoid having libraries with overlapping symbols. 
191         that was resulting in weirdness, e.g. I'm pretty sure there 
192         were two copies of global static variables.
193
194         * dbus/dbus-internals.c: move the malloc debug stuff to 
195         dbus-memory.c
196
197         * dbus/dbus-list.c (free_link): free list mempool if it becomes
198         empty.
199
200         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
201
202         * dbus/dbus-address.c (dbus_parse_address): free list nodes
203         on failure.
204
205         * bus/dispatch.c (bus_dispatch_add_connection): free
206         message_handler_slot when no longer using it, so 
207         memory leak checkers are happy for the test suite.
208
209         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
210
211         * bus/bus.c (new_connection_callback): disconnect in here if 
212         bus_connections_setup_connection fails.
213
214         * bus/connection.c (bus_connections_unref): fix to free the 
215         connections
216         (bus_connections_setup_connection): if this fails, don't
217         disconnect the connection, just be sure there are no side
218         effects.
219
220         * dbus/dbus-string.c (undo_alignment): unbreak this
221
222         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
223         leaking
224         (_dbus_auth_new): fix the order in which we free strings 
225         on OOM failure
226
227         * bus/connection.c (bus_connection_disconnected): fix to 
228         not send ServiceDeleted multiple times in case of memory 
229         allocation failure
230
231         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
232         get the base service name
233         (dbus_bus_register_client): don't return base service name,
234         instead store it on the DBusConnection and have an accessor
235         function for it.
236         (dbus_bus_register_client): rename dbus_bus_register()
237
238         * bus/dispatch.c (check_hello_message): verify that other 
239         connections on the bus also got the correct results, not 
240         just the one sending hello
241
242 2003-03-15  Havoc Pennington  <hp@pobox.com>
243
244         Make it pass the Hello handling test including all OOM codepaths.
245         Now to do other messages...
246         
247         * bus/services.c (bus_service_remove_owner): fix crash when
248         removing owner from an empty list of owners
249         (bus_registry_ensure): don't leave service in the list of 
250         a connection's owned services if we fail to put the service
251         in the hash table.
252
253         * bus/connection.c (bus_connection_preallocate_oom_error): set
254         error flag on the OOM error.
255
256         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
257         handle _dbus_transport_set_connection failure
258
259         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
260         to create watches up front and simply enable/disable them as
261         needed.
262         (unix_connection_set): this can now fail on OOM
263
264         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept 
265         of enabling/disabling a watch or timeout.
266
267         * bus/loop.c (bus_loop_iterate): don't touch disabled
268         watches/timeouts
269
270         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
271
272 2003-03-15  Havoc Pennington  <hp@pobox.com>
273
274         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
275         write useful test code, after all that futzing around ;-)
276
277         Test does not yet pass because we can't handle OOM in
278         _dbus_transport_messages_pending (basically,
279         dbus_connection_preallocate_send() does not prealloc the write
280         watch). To fix this, I think we need to add new stuff to
281         set_watch_functions, namely a SetEnabled function so we can alloc
282         the watch earlier, then enable it later.
283         
284         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
285         dbus-memory.c to the convenience lib
286
287         * bus/test.c: rename some static functions to keep them clearly 
288         distinct from stuff in connection.c. Handle client disconnection.
289
290 2003-03-14  Havoc Pennington  <hp@pobox.com>
291
292         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe 
293         transport, tests more of the real codepath. Set up clients 
294         with bus_setup_debug_client.
295
296         * bus/test.c (bus_setup_debug_client): function to set up debug 
297         "clients" on the main loop
298
299         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe 
300         support
301
302         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe 
303         server type
304
305         * dbus/dbus-server-debug.c: support a debug server based on pipes
306
307         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
308         (_dbus_close): new function
309         
310         * configure.in: check for socketpair
311
312 2003-03-14  Havoc Pennington  <hp@redhat.com>
313
314         * dbus/dbus-memory.c: add a "detect buffer overwrites on free" 
315         cheesy hack
316
317         * dbus/dbus-transport-debug.c: rework this a good bit to be 
318         less complicated. hopefully still works.
319
320         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
321         manually
322
323         * glib/dbus-gmain.c (timeout_handler): don't remove timeout 
324         after running it
325
326         * dbus/dbus-message.c (dbus_message_copy): rename from 
327         dbus_message_new_from_message, fix it up to copy 
328         all the message fields, add test case
329
330         * bus/dispatch.c (bus_dispatch_test): add some more test code, 
331         not quite passing yet
332
333 2003-03-14  Havoc Pennington  <hp@pobox.com>
334
335         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
336         until no work remains" in test code. (the large diff here 
337         is just code movement, no actual changes)
338
339         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
340         1, no point waiting around for test code.
341         (_dbus_server_debug_accept_transport): unref the timeout 
342         after adding it (right?)
343
344         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
345         
346 2003-03-13  Havoc Pennington  <hp@redhat.com>
347
348         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
349         out of memory
350
351         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
352         of memory
353
354         * dbus/dbus-connection.h: Make AddWatchFunction and
355         AddTimeoutFunction return a bool so they can fail on out-of-memory
356
357         * bus/bus.c (bus_context_new): set up timeout handlers
358
359         * bus/connection.c (bus_connections_setup_connection): set up
360         timeout handlers
361
362         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
363         can fail
364
365         * bus/bus.c (bus_context_new): adapt to changes
366
367         * bus/connection.c: adapt to changes
368
369         * test/watch.c: adapt to DBusWatch changes
370
371         * bus/dispatch.c (bus_dispatch_test): started adding this but
372         didn't finish
373         
374 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
375
376         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
377
378 2003-03-13  Havoc Pennington  <hp@pobox.com>
379
380         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c: 
381         set up a test framework as for the library
382
383 2003-03-12  Havoc Pennington  <hp@pobox.com>
384
385         Throughout: purge global variables, introduce BusActivation, 
386         BusConnections, BusRegistry, etc. objects instead.
387         
388         * bus/bus.h, bus/bus.c: introduce BusContext as a global 
389         message bus object
390
391         * test/Makefile.am (TEST_BINARIES): disable bus-test for now, 
392         going to redo this a bit differently I think
393         
394 2003-03-12  Havoc Pennington  <hp@redhat.com>
395
396         Mega-patch that gets the message bus daemon initially handling 
397         out-of-memory. Work still needed. Also lots of random 
398         moving stuff to DBusError instead of ResultCode.
399         
400         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
401
402         * dbus/dbus-connection.c
403         (dbus_connection_send_with_reply_and_block): use DBusError
404
405         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
406         DBusResultCode
407
408         * dbus/dbus-connection.c (dbus_connection_send): drop the result
409         code here, as the only failure possible is OOM.
410
411         * bus/connection.c (bus_connection_disconnect):
412         rename bus_connection_disconnected as it's a notification only
413
414         * bus/driver.c (bus_driver_handle_acquire_service): don't free
415         "name" on get_args failure, should be done by get_args; 
416         don't disconnect client for bad args, just return an error.
417         (bus_driver_handle_service_exists): ditto
418
419         * bus/services.c (bus_services_list): NULL-terminate returned array
420
421         * bus/driver.c (bus_driver_send_service_lost)
422         (bus_driver_send_service_acquired): send messages from driver to a
423         specific client to the client's unique name, not to the broadcast
424         service.
425
426         * dbus/dbus-message.c (decode_header_data): reject messages that
427         contain no name field
428         (_dbus_message_get_client_serial): rename to
429         dbus_message_get_serial and make public
430         (_dbus_message_set_serial): rename from set_client_serial
431         (_dbus_message_set_reply_serial): make public
432         (_dbus_message_get_reply_serial): make public
433
434         * bus/connection.c (bus_connection_foreach): allow stopping
435         iteration by returning FALSE from foreach function.
436
437         * dbus/dbus-connection.c (dbus_connection_send_preallocated) 
438         (dbus_connection_free_preallocated_send) 
439         (dbus_connection_preallocate_send): new API for sending a message
440         without possibility of malloc failure.
441         (dbus_connection_send_message): rename to just
442         dbus_connection_send (and same for whole function family)
443
444         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
445
446         * dbus/dbus-sysdeps.c (_dbus_exit): new function
447
448         * bus/activation.c: handle/return errors
449
450         * dbus/dbus-errors.h: add more DBUS_ERROR #define
451
452         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
453         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
454         (_dbus_result_from_errno): move to this file
455
456 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
457
458         * dbus/dbus-marshal.c: 
459         (_dbus_marshal_set_string):
460         Take a length argument so we can marshal the correct string
461         length.
462         
463         (_dbus_marshal_dict), (_dbus_demarshal_dict),
464         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
465         (_dbus_marshal_test):
466         * dbus/dbus-marshal.h:  
467         Add support for marshalling and demarshalling dicts.
468         
469         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
470         Add support for TYPE DICT.
471         
472         * dbus/dbus-message.c: (set_string_field):
473         Adjust header padding.
474         
475         (dbus_message_append_args_valist), (dbus_message_append_dict),
476         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
477         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
478         (check_message_handling), (check_have_valid_message):
479         * dbus/dbus-message.h:
480         Add functions for setting and getting dicts.
481
482         * dbus/dbus-protocol.h:
483         Add DBUS_TYPE_DICT.
484         
485         * dbus/dbus.h:
486         Add dbus-dict.h
487         
488         * doc/dbus-specification.sgml:
489         Add information about how dicts are marshalled.
490         
491         * test/data/invalid-messages/dict-with-nil-value.message:
492         * test/data/invalid-messages/too-short-dict.message:
493         * test/data/valid-messages/dict-simple.message:
494         * test/data/valid-messages/dict.message:
495         Add sample messages containing dicts.
496
497 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
498
499         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
500
501 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
502
503         * dbus/Makefile.am:
504         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
505         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
506         (dbus_dict_set_int32), (dbus_dict_set_uint32),
507         (dbus_dict_set_double), (dbus_dict_set_string),
508         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
509         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
510         (dbus_dict_set_string_array), (_dbus_dict_test):
511         * dbus/dbus-dict.h:
512         Fix according to comments from Havoc.
513         
514 2003-03-06  Michael Meeks  <michael@server.home>
515
516         * configure.in: if we don't have kde-config, disable have_qt.
517
518 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
519
520         * dbus/Makefile.am:
521         Add dbus-dict.[ch]
522         
523         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
524         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
525         (dbus_dict_remove), (dbus_dict_get_value_type),
526         (dbus_dict_get_keys), (dbus_dict_put_boolean),
527         (dbus_dict_put_int32), (dbus_dict_put_uint32),
528         (dbus_dict_put_double), (dbus_dict_put_string),
529         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
530         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
531         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
532         (dbus_dict_get_int32), (dbus_dict_get_uint32),
533         (dbus_dict_get_double), (dbus_dict_get_string),
534         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
535         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
536         (dbus_dict_get_string_array), (_dbus_dict_test):
537         * dbus/dbus-dict.h:
538         Add DBusDict implementation
539         
540         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
541         * dbus/dbus-test.h:
542         Add _dbus_dict_test
543         
544 2003-03-04  Havoc Pennington  <hp@pobox.com>
545
546         * test/data/auth/*: adapt to changes
547
548         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
549         USERID_BASE64 and change USERNAME_BASE64 to put in username not
550         userid
551
552         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
553         more stuff from being in a context name, to make the protocol 
554         simpler to deal with
555
556         * dbus/dbus-errors.c (dbus_error_has_name): new function
557         (dbus_error_is_set): new function
558
559         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth 
560         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
561         
562         * dbus/dbus-connection.c (dbus_connection_flush): also read
563         messages during a flush operation
564
565         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
566
567 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
568
569         * configure.in: Check for gethostbyname on Solaris.
570
571         * dbus/dbus-transport.c: (_dbus_transport_open):
572         Remove duplicate "tcp" entry.
573         
574         * doc/dbus-specification.sgml:
575         Clarify some things.
576         
577 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
578
579         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
580         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
581         (_dbus_keyring_test):
582         * dbus/dbus-md5.c: (_dbus_md5_compute):
583         * dbus/dbus-sha.c: (_dbus_sha_compute):
584         Plug memory leaks.
585
586 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
587
588         * README: Add some things.
589
590 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
591
592         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
593         after case DBUS_TYPE_BOOELAN.
594
595 2003-03-02  Havoc Pennington  <hp@pobox.com>
596
597         * test/break-loader.c (randomly_set_extreme_ints): add test that
598         sets really huge and small integers
599
600         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
601         that length of boolean array fits in the string, and that 
602         string has room for boolean value in single-bool case.
603
604         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
605         optional value to "ALIGN" command which is what to fill the
606         alignment with.
607
608         * test/data/valid-messages/no-padding.message: add regression
609         test for the message padding problem
610
611 2003-03-02  Havoc Pennington  <hp@pobox.com>
612
613         * dbus/dbus-message.c (decode_header_data): fix to always init
614         message_padding, from Benjamin Dauvergne
615
616 2003-03-02  Havoc Pennington  <hp@pobox.com>
617
618         * configure.in: 0.5
619
620         * NEWS: Update.
621
622 2003-03-01  Joe Shaw  <joe@assbarn.com>
623
624         * configure.in: Check for "struct cmsgcred" and try to access its
625         members for BSD-like unices.
626
627         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
628         _dbus_read_credentials_unix_socket().
629         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
630         read() for reading the credential byte off the unix socket.  Use
631         struct cmsgcred on systems that support it.
632
633 2003-02-27  Alexander Larsson  <alexl@redhat.com>
634
635         * glib/Makefile.am: 
636         * configure.in:
637         Make gthreads-2.0 dependency optional. Don't build thread test if
638         its not found.
639
640 2003-02-27  Havoc Pennington  <hp@pobox.com>
641
642         * dbus/dbus-connection.c
643         (dbus_connection_send_message_with_reply_and_block): fix doh!
644         doh! doh! bug that resulted in never removing a reply from the
645         queue, no wonder we called get_reply_serial so much ;-)
646         
647         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
648         and client serial instead of demarshaling them every time
649
650 2003-02-27  Havoc Pennington  <hp@pobox.com>
651
652         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
653         more inlined, using dbus-string-private.h, speeds things up 
654         substantially
655
656         * dbus/dbus-string.c (_dbus_string_free): apply align offset
657         when freeing the string
658         (_dbus_string_steal_data): fix for align offset
659         (undo_alignment): new function
660
661 2003-02-26  Havoc Pennington  <hp@redhat.com>
662
663         All kinds of audit fixes from Owen, plus initial attempt to 
664         handle unaligned memory returned from malloc.
665         
666         * dbus/dbus-string.c (_dbus_string_init): clamp max length to 
667         leave room for align_offset and nul byte
668         (fixup_alignment): function to track an align_offset and 
669         ensure real->str is aligned
670         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated, 
671         to allow a nul byte plus align offset
672         (_dbus_string_lock): fix overflow issue
673         (_dbus_string_init_const_len): add assertions on sanity of len, 
674         assign allocated to be ALLOCATION_PADDING larger than len
675         (set_length): fixup the overflow handling
676         (_dbus_string_get_data_len): fix overflow in assertion
677         (open_gap): detect overflow in size of gap to be opened
678         (_dbus_string_lengthen): add overflow check
679         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
680         (_dbus_string_append): add overflow check
681         (_dbus_string_append_unichar): overflow
682         (_dbus_string_delete): fix overflow in assertion
683         (_dbus_string_copy_len): overflow in assertion
684         (_dbus_string_replace_len): overflows in assertions
685         (_dbus_string_find): change to implement in terms of 
686         _dbus_string_find_to
687         (_dbus_string_find_to): assorted fixage
688         (_dbus_string_equal_c_str): assert c_str != NULL, 
689         fix logic so the function works
690         (_dbus_string_ends_with_c_str): fix overflow thingy
691         (_dbus_string_base64_encode): overflow fix
692         (_dbus_string_validate_ascii): overflow
693         (_dbus_string_validate_nul): overflow
694         
695 2003-02-26  Havoc Pennington  <hp@redhat.com>
696
697         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
698
699 2003-02-26  Alexander Larsson  <alexl@redhat.com>
700
701         * configure.in:
702         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
703         
704         * dbus/dbus-connection.c:
705         * dbus/dbus-connection.h:
706         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
707         Add dbus_connection_set_wakeup_main_function and use it when queueing
708         incoming and outgoing messages.
709         
710         
711         * dbus/dbus-dataslot.c:
712         Threadsafe usage of DBusDataSlotAllocator
713         
714         * dbus/dbus-message.c: (dbus_message_get_args_iter):
715         dbus_new can fail.
716         
717         * dbus/dbus-server-unix.c:
718         Add todo comment
719         
720         * glib/dbus-gmain.c:
721         Implement the new wakeup functions for glib.
722         
723         * glib/Makefile.am:
724         * glib/test-thread-client.c: 
725         * glib/test-thread-server.c: 
726         * glib/test-thread.h:
727         Initial cut at some thread test code. Not really done yet.
728
729 2003-02-26  Havoc Pennington  <hp@pobox.com>
730
731         * dbus/dbus-connection.c
732         (dbus_connection_send_message_with_reply_and_block): fix crash
733         where we ref'd the outgoing message instead of the returned reply
734
735         * dbus/dbus-transport-unix.c (do_authentication): check read watch
736         at the end of this function, so if we didn't need to read for
737         authentication, we reinstall it for receiving messages
738
739         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to 
740         a NULL sender for peer-to-peer case
741
742         * dbus/dbus-transport-unix.c (check_read_watch): handle
743         !authenticated case correctly
744
745         * glib/dbus-gmain.c: add support for DBusServer
746
747         * dbus/dbus-server.c: add data slot support
748
749         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
750         return values and handle errors
751
752         * dbus/dbus-dataslot.c: factor out the data slot stuff from
753         DBusConnection
754
755         * Doxyfile.in (INPUT): add glib subdir
756
757         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename 
758         setup_with_g_main instead of hookup_with_g_main; write docs
759         
760 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
761
762         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
763         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
764         * dbus/dbus-message.c: (dbus_message_append_boolean),
765         (dbus_message_append_boolean_array),
766         (dbus_message_get_args_valist), (_dbus_message_test):
767         * dbus/dbus-message.h:
768         * doc/dbus-specification.sgml:
769         Various fixes as pointed out by Havoc.
770         
771         * test/data/invalid-messages/bad-boolean-array.message:
772         * test/data/invalid-messages/bad-boolean.message:
773         Add invalid boolean value test cases.
774         
775 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
776
777         * dbus/dbus-internals.c: (_dbus_type_to_string):
778         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
779         (_dbus_marshal_validate_arg):
780         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
781         * dbus/dbus-message.c: (dbus_message_append_args_valist),
782         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
783         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
784         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
785         (dbus_message_iter_get_double),
786         (dbus_message_iter_get_boolean_array), (message_iter_test):
787         * dbus/dbus-message.h:
788         * dbus/dbus-protocol.h:
789         * doc/dbus-specification.sgml:
790         * test/data/valid-messages/lots-of-arguments.message:
791         Add support for boolean and boolean array types.
792         
793 2003-02-23  Havoc Pennington  <hp@pobox.com>
794
795         * dbus/dbus-keyring.c: finish most of this implementation and 
796         simple unit test
797
798         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
799         these barf if the error isn't cleared to NULL
800
801         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
802         (_dbus_create_directory): new function
803
804         * dbus/dbus-errors.c (dbus_set_error): fix warning
805
806         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
807         (_dbus_string_hex_decode): new function
808         (test_hex_roundtrip): test code
809
810         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
811
812         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
813
814         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use 
815         the save-to-temp/rename trick to atomically write the new file
816         (_dbus_string_parse_uint): new function
817
818 2003-02-22  Havoc Pennington  <hp@pobox.com>
819
820         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
821
822 2003-02-22  Havoc Pennington  <hp@pobox.com>
823
824         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
825         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
826
827         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
828
829         * dbus/test/data/sha-1: add US government test suite for SHA-1
830
831 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
832
833         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
834         Make string arrays NULL-terminated.
835         
836         * dbus/dbus-memory.c: (dbus_free_string_array):
837         * dbus/dbus-memory.h:
838         New function for freeing NULL-terminated string arrays.
839         
840         * dbus/dbus-message-builder.c: (append_quoted_string),
841         (_dbus_message_data_load):
842         Add support for array types.
843         
844         * dbus/dbus-message.c: (check_message_handling):
845         Add more types as test cases.
846         
847         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
848         (_dbus_string_parse_double):
849         Add the start offset to the end offset.
850         
851         * test/data/valid-messages/lots-of-arguments.message:
852         New test message with lots of arguments.
853         
854 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
855
856         * dbus/dbus-message.c: (dbus_message_append_nil),
857         (dbus_message_append_int32), (dbus_message_append_uint32),
858         (dbus_message_append_double), (dbus_message_append_string),
859         (dbus_message_append_int32_array),
860         (dbus_message_append_uint32_array),
861         (dbus_message_append_double_array),
862         (dbus_message_append_byte_array),
863         (dbus_message_append_string_array):
864         Fix all out-of-memory handling in these functions.
865
866 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
867
868         * dbus/dbus-message.c: (dbus_message_append_nil):
869         Fix a silly.
870         
871 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
872
873         * dbus/dbus-message.c: (dbus_message_append_args_valist),
874         (dbus_message_append_nil), (dbus_message_append_int32_array),
875         (dbus_message_append_uint32_array),
876         (dbus_message_append_double_array),
877         (dbus_message_append_byte_array),
878         (dbus_message_append_string_array), (dbus_message_get_args_valist),
879         (dbus_message_iter_get_int32_array),
880         (dbus_message_iter_get_uint32_array),
881         (dbus_message_iter_get_double_array),
882         (dbus_message_iter_get_byte_array),
883         (dbus_message_iter_get_string_array):
884
885         * dbus/dbus-message.h:
886         Add functions for appending and getting arrays.
887         
888 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
889
890         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
891         element size at least 8 bytes, fixes mempool tests on
892         64-bit machines.
893
894 2003-02-20  Alexander Larsson  <alexl@redhat.com>
895
896         * dbus/dbus-transport-unix.c (unix_do_iteration):
897         Unlock the connection mutex during a blocking select call.
898         Add todo about how we need a way to wake up the select.
899
900         * dbus/dbus-connection-internal.h: 
901         * dbus/dbus-connection.c:
902         Add _dbus_connection_lock and _dbus_connection_unlock.
903
904 2003-02-19  Havoc Pennington  <hp@pobox.com>
905
906         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
907         Doxyfile.in, not Doxyfile
908
909         * dbus/dbus-keyring.c: do some hacking on this
910
911         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
912
913         * dbus/dbus-errors.c (dbus_set_error_const): do not call
914         dbus_error_init
915         (dbus_set_error): remove dbus_error_init, check for message ==
916         NULL *before* we sprintf into it, and add @todo about including 
917         system headers in this file
918
919         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
920
921         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
922
923         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
924         get various bits of user information based on either username 
925         or user ID
926         (_dbus_homedir_from_username): new function
927
928 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
929
930         * configure.in:
931         Add check for nonposix getpwnam_r
932         
933         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
934         Align the pool element size to a sizeof (void *) boundary.
935         
936         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
937         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
938         General Solaris fixes.
939         
940         * test/data/valid-messages/simplest-manual.message:
941         Explicitly state that we want little-endian packing.
942         
943 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
944
945         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
946
947         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket): 
948         Added to create a transport connecting using a tcp/ip socket.
949
950         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
951         to a tcp socket at given host and port.
952         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
953         hostname and port.
954
955         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
956
957         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket): 
958         Added to create a server listening on a TCP/IP socket.
959
960 2003-02-19  Havoc Pennington  <hp@pobox.com>
961
962         Throughout: mop up all the Doxygen warnings and undocumented
963         stuff.
964         
965         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
966         to search any paths.
967
968         * dbus/dbus-threads.c: move global mutex initializers to
969         dbus-internals.h, multiple prototypes was confusing doxygen
970         besides being kind of ugly
971
972         * Doxyfile (PREDEFINED): have Doxygen define
973         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from 
974         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
975         (do not abuse the feature! it's for stuff like the autogenerated 
976         macros in dbus-md5.c, not just for things you don't feel like 
977         documenting...)
978
979 2003-02-18  Havoc Pennington  <hp@pobox.com>
980
981         * dbus/dbus-string.c (_dbus_string_zero): new function
982
983         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
984         wrap it in some dbus-friendly API
985
986         * dbus/dbus-types.h: add 16-bit types
987
988 2003-02-18  Joe Shaw  <joe@assbarn.com>
989
990         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
991         credentials from our currently running process.
992         (get_word): Fix a buglet where we were copying the entire length
993         instead of relative to our position.
994
995         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
996         keys on the stack... it's 640k of data.
997
998         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
999         read the credentials byte off the socket, even if we don't have
1000         SO_PEERCRED.
1001         (_dbus_poll): Implement poll() using select() for systems which
1002         don't have it.
1003
1004         * glib/test-dbus-glib.c (main): Print out an error if no
1005         parameters are given.
1006
1007         * test/data/auth/fallback.auth-script: Added.  Tests that a client
1008         can fallback to a secondary auth mechanism if the first fails.
1009
1010 2003-02-18  Havoc Pennington  <hp@pobox.com>
1011
1012         * AUTHORS: add Alex
1013
1014 2003-02-17  Havoc Pennington  <hp@pobox.com>
1015
1016         * doc/dbus-specification.sgml: lots of cosmetic
1017         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1018         env variable to DBUS_BUS_ADDRESS, s/client/application/,
1019         s/server/bus/ (except in authentication section). Add a section
1020         "Message Bus Message Routing"
1021
1022 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
1023
1024         Release 0.4
1025         
1026         * NEWS: Update
1027
1028 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
1029
1030         * doc/dbus-specification.sgml:
1031         Specification updates.
1032         
1033 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
1034
1035         * bus/activation.c: (bus_activation_init), (child_setup),
1036         (bus_activation_activate_service):
1037         * bus/activation.h:
1038         * bus/main.c: (main):
1039         Set DBUS_ADDRESS environment variable.
1040         
1041         * dbus/dbus-errors.c: (dbus_set_error):
1042         Don't use va_copy since that's a C99 feature.
1043         
1044         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1045         (_dbus_spawn_async):
1046         * dbus/dbus-sysdeps.h:
1047         Add child_setup_func to _dbus_spawn_async.
1048         
1049         * doc/dbus-specification.sgml:
1050         Update specification.
1051         
1052         * test/spawn-test.c: (setup_func), (main):
1053         Fix test.
1054         
1055 2003-02-17  Alexander Larsson  <alexl@redhat.com>
1056
1057         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1058         Added todo.
1059
1060 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
1061
1062         * doc/.cvsignore:
1063         * doc/Makefile.am:
1064         * doc/dbus-test-plan.sgml:
1065         Add test plan document.
1066         
1067         * test/Makefile.am:
1068         Fix distcheck.
1069         
1070 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
1071
1072         * dbus/dbus-message.c: (decode_header_data),
1073         (_dbus_message_loader_return_buffer):
1074         Set the header padding amount when loading a message.
1075
1076 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
1077
1078         * bus/dispatch.c: (send_one_message):
1079         Only send broadcast messages to registered connections.
1080         
1081         * dbus/dbus-message.c: (dbus_message_name_is):
1082         * dbus/dbus-message.h:
1083         New convenience function.
1084         
1085         * dbus/dbus-transport-debug.c: (do_reading):
1086         Only dispatch one message per run.
1087
1088         * test/Makefile.am:
1089         * test/bus-test.c: (new_connection_callback), (die),
1090         (test_hello_client1_handler), (test_hello_client2_handler),
1091         (test_hello_replies), (main):
1092
1093         * test/bus-test-loop.[ch]:
1094         Add these.
1095         
1096 2003-02-16  Havoc Pennington  <hp@pobox.com>
1097
1098         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1099         backward conditional
1100
1101 2003-02-16  Alexander Larsson  <alexl@redhat.com>
1102
1103         * dbus/dbus-connection.c:
1104         Implement sent_message_with_reply. (with_reply_and block is still
1105         busted).
1106         Made dispatch_message not lose message if OOM.
1107         
1108         * dbus/dbus-errors.h:
1109         Add NoReply error (for reply timeouts).
1110
1111 2003-02-16  Alexander Larsson  <alexl@redhat.com>
1112
1113         * dbus/dbus-hash.c (_dbus_hash_table_unref):
1114         Actually free keys and values when destroying hashtable.
1115
1116 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
1117
1118         * dbus/dbus-auth.c: (client_try_next_mechanism):
1119         Plug a leak.
1120         
1121         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1122         Return TRUE if there's no thread implementation around.
1123         
1124         * glib/dbus-gmain.c: (free_source),
1125         (dbus_connection_hookup_with_g_main):
1126         Make sure to remove the GSource when the connection is finalized.
1127         
1128 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
1129
1130         * bus/dispatch.c: (bus_dispatch_message_handler):
1131         * dbus/dbus-errors.h:
1132         Return an error if someone tries to send a message to a service
1133         that doesn't exist.
1134         
1135 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
1136
1137         * bus/activation.c: (load_directory), (bus_activation_init),
1138         (bus_activation_activate_service):
1139         * bus/activation.h:
1140         * bus/driver.c: 
1141         (bus_driver_handle_activate_service), (bus_driver_handle_message):
1142         More work on the activation handling.
1143         
1144         * dbus/dbus-errors.h:
1145         Add some error messages
1146         
1147         * dbus/dbus-message.c: (dbus_message_new_error_reply):
1148         * dbus/dbus-message.h:
1149         New function that creates an error message.
1150         
1151         * dbus/dbus-protocol.h:
1152         Add ACTIVATE_SERVER message.
1153         
1154         * dbus/dbus-server-unix.c: (unix_handle_watch),
1155         (_dbus_server_new_for_domain_socket):
1156         Call _dbus_fd_set_close_on_exec.
1157         
1158         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1159         (_dbus_spawn_async), (_dbus_disable_sigpipe),
1160         (_dbus_fd_set_close_on_exec):
1161         * dbus/dbus-sysdeps.h:
1162         Add _dbus_fd_set_close_on exec function. Also add function that checks
1163         that all open fds are set to close-on-exec and warns otherwise.
1164         
1165         * dbus/dbus-transport-unix.c:
1166         (_dbus_transport_new_for_domain_socket):
1167         Call _dbus_fd_set_close_on_exec.
1168
1169 2003-02-16  Havoc Pennington  <hp@pobox.com>
1170
1171         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1172         allow people to avoid setting SIGPIPE to SIG_IGN
1173         (_dbus_connection_new_for_transport): disable SIGPIPE unless 
1174         we've been asked not to
1175
1176 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
1177
1178         * dbus/dbus-list.c: (_dbus_list_append_link),
1179         (_dbus_list_prepend_link):
1180         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1181         (dbus_realloc):
1182         Warning fixes.
1183
1184 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
1185
1186         * bus/Makefile.am:
1187         * bus/activation.c: (bus_activation_entry_free),
1188         (add_desktop_file_entry), (load_directory), (bus_activation_init):
1189         * bus/activation.h:
1190         * bus/main.c: (main):
1191         Add simple activation support, doesn't work yet though.
1192
1193 2003-02-15   Zack Rusin  <zack@kde.org>
1194
1195         * qt/dbus-qthread.cpp:  small casting fix
1196
1197 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
1198
1199         * dbus/dbus-errors.c: (dbus_set_error):
1200         * dbus/dbus-errors.h:
1201         Add a few errors and make dbus_set_error void.
1202         
1203         * dbus/dbus-sysdeps.c: 
1204         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1205         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1206         * dbus/dbus-sysdeps.h:
1207         Add _dbus_spawn_async.
1208         
1209         * test/spawn-test.c: (main):
1210         Test for _dbus_spawn_async.
1211         
1212 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
1213
1214         * dbus/dbus-internals.h:
1215         Fix build without tests.
1216         
1217         * dbus/dbus-list.c: (alloc_link):
1218         Fix a segfault when a malloc fails.
1219         
1220         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1221         (dbus_malloc0), (dbus_realloc):
1222         Add support for malloc debugging.
1223
1224 2003-02-15  Alexander Larsson  <alexl@redhat.com>
1225
1226         * dbus/dbus-threads.c:
1227         * dbus/dbus-threads.h:
1228         Add condvars. Remove static mutext from API.
1229         Implement static mutexes by initializing them from threads_init.
1230         
1231         * glib/dbus-gthread.c:
1232         * qt/dbus-qthread.cpp:
1233         Update with the thread api changes.
1234
1235                 
1236         * dbus/dbus-list.c:
1237         * dbus/dbus-list.h:
1238         Turn StaticMutex into normal mutex + init function.
1239         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1240         _dbus_list_append_link, _dbus_list_prepend_link
1241
1242
1243         * dbus/dbus-sysdeps.c: 
1244         * dbus/dbus-sysdeps.h:
1245         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1246         _dbus_atomic_dec. Only slow fallback implementation at the moment.
1247         
1248         * dbus/dbus-protocol.h:
1249         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1250         
1251         * dbus/dbus-message.c:
1252         Make ref/unref atomic.
1253         Fix some docs.
1254         
1255         * dbus/dbus-connection-internal.h:
1256         * dbus/dbus-connection.c:
1257         * dbus/dbus-connection.h:
1258         Make threadsafe.
1259         Change _peek to _borrow,_return & _steal_borrowed.
1260         Change disconnect callback to event.
1261         Make dbus_connection_dispatch_messages reentrant.
1262         
1263         * dbus/dbus-transport.c:
1264         Don't ref the connection on calls to the transport
1265         implementation.
1266         
1267         * dbus/dbus-message-handler.c:
1268         Make threadsafe.
1269         
1270         * glib/dbus-gmain.c:
1271         Don't use peek_message anymore
1272         
1273         * test/Makefile.am:
1274         * test/debug-thread.c:
1275         * test/debug-thread.h:
1276         Simple thread implementation that asserts() on deadlocks in
1277         single-threaded code.
1278         
1279         * test/bus-test.c:
1280         (main) Call debug_threads_init.
1281
1282         * test/watch.c:
1283         Use disconnect message instead of disconnect callback.
1284
1285         * bus/connection.c:
1286         * bus/connection.h:
1287         Don't call dbus_connection_set_disconnect_function. Instead export
1288         bus_connection_disconnect.
1289         
1290         * bus/dispatch.c:
1291         Call bus_connection_disconnect when we get a disconnected message.
1292         
1293 2003-02-15  Havoc Pennington  <hp@pobox.com>
1294
1295         * dbus/dbus-message.c (dbus_message_new): fool around with the
1296         docs
1297
1298 2003-02-14  Havoc Pennington  <hp@pobox.com>
1299
1300         * dbus/dbus-mempool.c: fail if the debug functions so indicate
1301
1302         * dbus/dbus-memory.c: fail if the debug functions indicate we
1303         should
1304
1305         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1306         (_dbus_decrement_fail_alloc_counter): debug functions to 
1307         simulate memory allocation failures
1308
1309 2003-02-14  Havoc Pennington  <hp@pobox.com>
1310
1311         * dbus/dbus-errors.h (struct DBusError): add a word of padding 
1312         to DBusError
1313
1314 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1315
1316         * bus/driver.c: (bus_driver_handle_hello):
1317         * bus/driver.h:
1318         * bus/services.c: (bus_service_lookup):
1319         Reorder message sending so we get a more sane order.
1320         
1321         * test/bus-test.c: (message_handler):
1322         Fix tyop.
1323         
1324 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1325
1326         * bus/driver.c: (bus_driver_send_service_deleted),
1327         (bus_driver_send_service_created), (bus_driver_send_service_lost),
1328         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1329         (bus_driver_send_welcome_message),
1330         (bus_driver_handle_list_services),
1331         (bus_driver_handle_acquire_service),
1332         (bus_driver_handle_service_exists):
1333         * dbus/dbus-bus.c: (dbus_bus_register_client),
1334         (dbus_bus_acquire_service), (dbus_bus_service_exists):
1335         * dbus/dbus-errors.c: (dbus_result_to_string):
1336         * dbus/dbus-errors.h:
1337         * dbus/dbus-message.c: (dbus_message_append_args),
1338         (dbus_message_append_args_valist), (dbus_message_get_args),
1339         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1340         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1341         (dbus_message_iter_get_byte_array),
1342         (dbus_message_iter_get_string_array), (message_iter_test),
1343         (check_message_handling), (_dbus_message_test):
1344         * dbus/dbus-message.h:
1345         * test/bus-test.c: (main):
1346         Change fields to arguments in messages, so that they won't be
1347         confused with header fields.
1348         
1349         * glib/test-dbus-glib.c: (main):
1350         Remove append_fields from hello message.
1351         
1352 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1353
1354         * dbus/dbus-errors.c:
1355         * dbus/dbus-message.c:
1356         * dbus/dbus-string.c:
1357         Documentation fixes.
1358
1359 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1360
1361         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1362         (remove_timeout):
1363         Implement support for timeouts in dbus-glib.
1364         
1365 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1366
1367         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1368         * dbus/dbus-message.c: (process_test_subdir):
1369         * test/break-loader.c: (find_breaks_based_on):
1370         Plug some memory leaks.
1371         
1372 2003-02-13  Richard Hult  <rhult@codefactory.se>
1373
1374         * bus/main.c: Fix build.
1375
1376         * dbus/dbus-errors.h: 
1377         * dbus/dbus-errors.c: Fix copyright for Anders.
1378
1379 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1380
1381         * bus/Makefile.am:
1382         Add utils.[ch]
1383         
1384         * bus/connection.c: (bus_connection_foreach):
1385         Fix a warning.
1386         
1387         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1388         (unescape_string), (new_section), (parse_section_start),
1389         (parse_key_value), (report_error), (bus_desktop_file_load),
1390         (bus_desktop_file_get_string):
1391         * bus/desktop-file.h:
1392         Use DBusError for error reporting.
1393         
1394         * bus/dispatch.c: (send_one_message),
1395         (bus_dispatch_message_handler):
1396         * bus/driver.c: (bus_driver_send_service_deleted),
1397         (bus_driver_send_service_created), (bus_driver_send_service_lost),
1398         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1399         (bus_driver_send_welcome_message),
1400         (bus_driver_handle_list_services),
1401         (bus_driver_handle_acquire_service),
1402         (bus_driver_handle_service_exists):
1403         * bus/loop.c: (bus_loop_run):
1404         * bus/main.c:
1405         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1406         
1407         * bus/utils.c: (bus_wait_for_memory):
1408         * bus/utils.h:
1409         New files with general utility functions.
1410         
1411         * dbus/dbus-internals.h:
1412         Remove _DBUS_HANDLE_OOM.
1413         
1414 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1415
1416         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1417         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1418         * dbus/dbus-errors.h:
1419         Add DBusError structure.
1420         
1421 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1422
1423         * test/data/valid-messages/standard-acquire-service.message:
1424         * test/data/valid-messages/standard-hello.message:
1425         * test/data/valid-messages/standard-list-services.message:
1426         * test/data/valid-messages/standard-service-exists.message:
1427         Add some standard messages.
1428         
1429 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1430
1431         * bus/driver.c: (bus_driver_send_welcome_message),
1432         (bus_driver_handle_list_services),
1433         (bus_driver_handle_acquire_service),
1434         (bus_driver_handle_service_exists), (bus_driver_handle_message):
1435         Update for API changes in libdbus.
1436         
1437         * dbus/dbus-message.c: (dbus_message_new_reply):
1438         * dbus/dbus-message.h:
1439         Remove the name argument. The spec states that replies shouldn't
1440         have a name.
1441
1442 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
1443
1444         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1445         (report_error), (bus_desktop_file_load), (lookup_section),
1446         (lookup_line), (bus_desktop_file_get_raw),
1447         (bus_desktop_file_get_string):
1448         * bus/desktop-file.h:
1449         Some fixes, and new functions for getting a key value from a section.
1450         
1451 2003-02-13  Havoc Pennington  <hp@pobox.com>
1452
1453         * test/data/auth/fail-after-n-attempts.auth-script: new test
1454
1455         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1456         reject the client.
1457
1458 2003-02-13  Havoc Pennington  <hp@pobox.com>
1459
1460         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1461         dbus_credentials_match were backward
1462
1463         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1464         NO_CREDENTIALS and ROOT_CREDENTIALS
1465
1466         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine 
1467         into here. Never process more commands after we've reached an 
1468         end state; store further data as unused bytes.
1469
1470         * test/data/auth/*: add more auth tests
1471         
1472         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1473         command to match exact string and EXPECT_UNUSED to match unused
1474         bytes
1475
1476         * test/Makefile.am (dist-hook): fix to dist all the test stuff
1477
1478 2003-02-12  Havoc Pennington  <hp@pobox.com>
1479
1480         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1481         \r off of popped lines
1482
1483         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1484         scripts
1485
1486         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1487         SEND, append \r\n
1488
1489 2003-02-12  Havoc Pennington  <hp@pobox.com>
1490
1491         * dbus/Makefile.am: remove break-loader from the build, since it
1492         moved.
1493
1494         * configure.in: add --enable-gcov to turn on coverage profiling
1495         flags and disable optimization
1496
1497 2003-02-10  Havoc Pennington  <hp@pobox.com>
1498
1499         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync 
1500         initial cut at test framework for DBusAuth from laptop.
1501         Doesn't quite work yet but it compiles and I need to get 
1502         it off the 266mhz laptop. ;-)
1503         
1504         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1505         fix a memleak in error case
1506
1507 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
1508
1509         * bus/Makefile.am:
1510         * bus/desktop-file.c:
1511         * bus/desktop-file.h:
1512         Add a desktop file parser.
1513
1514 2003-02-11  Zack Rusin  <zack@kde.org>
1515
1516         * qt/message.[h|cpp]: sample implementation
1517         of the KDE wrapper for DBusMessage
1518
1519 2003-02-09  Zack Rusin  <zack@kde.org>
1520
1521         * test/bus-test.c: make_it_compile
1522         * doc/dbus-specification.sgml: minimal semantic fix
1523
1524 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
1525
1526         Release 0.3
1527         
1528         * NEWS: Update
1529
1530 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
1531
1532         * dbus/Makefile.am:
1533         * dbus/dbus-break-loader.c:
1534         * test/Makefile.am:
1535         * test/break-loader.c:
1536         Move dbus-break-loader to test/ and rename it to break-loader.
1537
1538 2003-02-02  Havoc Pennington  <hp@pobox.com>
1539
1540         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files 
1541         for code to manage cookies in your home directory
1542
1543         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1544
1545         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1546         to authenticate, then disconnect the client.
1547
1548 2003-02-03  Alexander Larsson  <alexl@redhat.com>
1549
1550         * dbus/dbus-message.c (dbus_message_append_fields):
1551         Correct docs.
1552
1553 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
1554
1555         * doc/dbus-specification.sgml:
1556         Update address format section.
1557         
1558 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
1559
1560         * test/Makefile.am:
1561         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1562         (message_handler), (new_connection_callback), (loop_quit),
1563         (loop_run), (main):
1564         Add bus test.
1565         
1566 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
1567
1568         * bus/driver.c: (bus_driver_handle_service_exists):
1569         Simplify the code a bit.
1570         
1571         * dbus/dbus-bus.c: (dbus_bus_service_exists):
1572         Fix a silly. 
1573         
1574 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
1575
1576         * bus/Makefile.am:
1577         Add libdbus-daemon.la and link to it.
1578
1579 2003-02-01  James Willcox  <jwillcox@gnome.org>
1580
1581         * bus/driver.c: (bus_driver_handle_own_service):
1582         Actually include the service reply code in the message.
1583
1584 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
1585
1586         * bus/driver.c: (bus_driver_handle_service_exists):
1587         Don't unref the incoming message.
1588         
1589 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
1590
1591         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
1592
1593 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
1594
1595         * dbus/dbus-server.c: (dbus_server_listen):
1596         * dbus/dbus-transport.c: (_dbus_transport_open):
1597         ifdef out the calls to the debug transport and server.
1598         
1599 2003-02-02  Alexander Larsson  <alexl@redhat.com>
1600
1601         * dbus/dbus-watch.c (dbus_watch_get_flags):
1602         Add note in the docs that ERROR or HANGUP won't be returned
1603         and are assumed always on.
1604
1605         * glib/dbus-gmain.c (add_watch):
1606         Always add IO_ERR | IO_HUP
1607
1608         * dbus/dbus-message.h:
1609         Add semicolon after dbus_message_iter_get_string_array().
1610         Makes qt code build again
1611
1612 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
1613
1614         * bus/driver.c: (create_unique_client_name),
1615         (bus_driver_handle_hello):
1616         Don't take a name, just use a numeric id to identify
1617         each client.
1618         
1619         * dbus/Makefile.am:
1620         * dbus/dbus-bus.c: (dbus_bus_register_client),
1621         (dbus_bus_acquire_service), (dbus_bus_service_exists):
1622         * dbus/dbus-bus.h:
1623         Add new convenience functions for communicating with the bus.
1624         
1625         * dbus/dbus-message.h:
1626         
1627         * dbus/dbus-protocol.h:
1628         Fix a typo.
1629         
1630 2003-02-01  Alexander Larsson  <alexl@redhat.com>
1631
1632         * dbus/dbus-message.c (dbus_message_append_fields):
1633         Add some more doc comments.
1634
1635 2003-02-01  Havoc Pennington  <hp@pobox.com>
1636
1637         * dbus/dbus-break-loader.c (randomly_modify_length): change 
1638         a 4-byte value in the message as if it were a length
1639
1640         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
1641         execute bit on saved files
1642
1643 2003-02-01  Havoc Pennington  <hp@pobox.com>
1644
1645         * dbus/dbus-break-loader.c (main): new program to find messages
1646         that break the loader.
1647
1648         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
1649         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
1650
1651         * dbus/dbus-string.c (_dbus_string_set_byte): new
1652         
1653 2003-01-31  Havoc Pennington  <hp@pobox.com>
1654
1655         * dbus/dbus-message.c: refactor the test code to be more general, 
1656         in preparation for writing a "randomly permute test cases to 
1657         try to break the loader" program.
1658
1659 2003-01-31  Havoc Pennington  <hp@pobox.com>
1660         
1661         * doc/dbus-specification.sgml: work on the specification
1662
1663         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check 
1664         the protocol version of the message.
1665
1666         * dbus/dbus-protocol.h: drop special _REPLY names, the spec 
1667         no longer specifies that.
1668         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not 
1669         1/2/3/4)
1670
1671         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
1672         "break" for DBUS_TYPE_NIL, remove @todo
1673
1674 2003-01-31  Havoc Pennington  <hp@pobox.com>
1675
1676         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename 
1677         just set_is_error/get_is_error as this is a commonly-used
1678         function, and write docs.
1679
1680 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
1681
1682         * dbus/dbus-address.c: (dbus_address_entry_free):
1683         Free key and value lists.
1684         
1685         * dbus/dbus-internals.c: (_dbus_type_to_string):
1686         Add the types we didn't have.
1687         
1688         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1689         (_dbus_marshal_validate_arg):
1690         Add NIL types.
1691         
1692         * dbus/dbus-message.c: (dbus_message_set_sender):
1693         Remove todo about being able to set sender to NULL.
1694         
1695         (dbus_message_set_is_error_reply),
1696         (dbus_message_get_is_error_reply):
1697         * dbus/dbus-message.h:
1698         New functions.
1699         
1700         * dbus/dbus-protocol.h:
1701         Add error reply flag.
1702         
1703         * test/data/valid-messages/opposite-endian.message:
1704         Add NIL type to test.
1705         
1706 2003-01-31  Havoc Pennington  <hp@pobox.com>
1707
1708         * doc/dbus-specification.sgml: fully specify the header.  Add
1709         flags and major protocol version, and change header/body len to
1710         unsigned.
1711
1712         * dbus/dbus-message-builder.c (append_saved_length): append length
1713         as uint32
1714
1715         * dbus/dbus-message.c (dbus_message_create_header): change header
1716         length and body length to unsigned. Add the new fields from the
1717         spec
1718         (_dbus_message_loader_return_buffer): unsigned header/body len
1719
1720 2003-01-30  Havoc Pennington  <hp@pobox.com>
1721
1722         * dbus/dbus-auth.c: rework to use only REJECTED, no 
1723         MECHANISMS
1724
1725         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just 
1726         use REJECTED, suggested by Mark McLoughlin
1727
1728 2003-01-30  Havoc Pennington  <hp@pobox.com>
1729
1730         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1731         a better way to report errors here. e.g.  "unix address lacks
1732         path" or something. also "no such file" when the path doesn't
1733         exist, etc.
1734
1735         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1736         leaking list nodes
1737         (dbus_parse_address): add @todo about documenting address format, 
1738         and allowing , and ; to be escaped
1739
1740 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
1741
1742         * dbus/Makefile.am:
1743         Add dbus-address.[ch]
1744         
1745         * dbus/dbus-address.c: (dbus_address_entry_free),
1746         (dbus_address_entries_free), (create_entry),
1747         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1748         (dbus_parse_address), (_dbus_address_test):
1749         * dbus/dbus-address.h:
1750         New files for dealing with address parsing.
1751         
1752         * dbus/dbus-connection.c:
1753         Document timeout functions.
1754         
1755         * dbus/dbus-message.c:
1756         Document dbus_message_new_from_message.
1757         
1758         * dbus/dbus-server-debug.c:
1759         Document.
1760         
1761         * dbus/dbus-server.c: (dbus_server_listen):
1762         Parse address and use correct server implementation.
1763         
1764         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1765         * dbus/dbus-string.h:
1766         New function with test.
1767         
1768         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1769         * dbus/dbus-test.h:
1770         Add address tests.
1771         
1772         * dbus/dbus-transport-debug.c:
1773         Document.
1774         
1775         * dbus/dbus-transport.c: (_dbus_transport_open):
1776         Parse address and use correct transport implementation. 
1777
1778 2003-01-30  Havoc Pennington  <hp@pobox.com>
1779
1780         * dbus/dbus-message.c: use message->byte_order instead of 
1781         DBUS_COMPILER_BYTE_ORDER throughout.
1782         (dbus_message_create_header): pad header to align the 
1783         start of the body of the message to 8-byte boundary
1784
1785         * dbus/dbus-marshal.h: make all the demarshalers take const 
1786         DBusString arguments.
1787
1788         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1789         validate message args here, so we don't have to do slow validation
1790         later, and so we catch bad messages as they are incoming. Also add
1791         better checks on header_len and body_len. Also fill in
1792         message->byte_order
1793
1794         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1795         implemented properly)
1796         (_dbus_string_validate_nul): new function to check all-nul
1797
1798         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename 
1799         get_arg_end_pos and remove all validation
1800         (_dbus_marshal_validate_arg): actually do validation here.
1801
1802 2003-01-29  Havoc Pennington  <hp@pobox.com>
1803
1804         * dbus/dbus-message.c (check_message_handling): fix assertion
1805         failure on set_client_serial
1806
1807 2003-01-28  Havoc Pennington  <hp@pobox.com>
1808
1809         * dbus/dbus-server-debug.c: Add doc section comments
1810         
1811         * dbus/dbus-transport-debug.c: add doc section comments
1812         
1813 2003-01-28  Havoc Pennington  <hp@redhat.com>
1814
1815         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1816         the reverse order from how I had it
1817         (_dbus_string_base64_encode): reverse encoding order. I was
1818         basically byteswapping everything during encoding.
1819
1820 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
1821
1822         * dbus/dbus-connection-internal.h:
1823         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1824         (_dbus_connection_remove_timeout):
1825         Add functions for adding and removing timeouts.
1826         
1827         * dbus/dbus-message.c: (dbus_message_new_from_message):
1828         Add new function that takes a message and creates an exact
1829         copy of it, but with the refcount set to 1.
1830         (check_message_handling):
1831         Fix build error.
1832         
1833         * dbus/dbus-server-protected.h:
1834         * dbus/dbus-server.c: (_dbus_server_init_base),
1835         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1836         (dbus_server_set_timeout_functions):
1837         (_dbus_server_remove_timeout):
1838         New functions so that a server can add and remove timeouts.
1839
1840         (dbus_server_listen):
1841         Add commented out call to dbus_server_debug_new.
1842
1843         * dbus/dbus-timeout.c: (_dbus_timeout_new):
1844         Actually set the handler, doh.
1845         
1846         * dbus/dbus-transport.c: (_dbus_transport_open):
1847         Add commented out call to dbus_transport_debug_client_new.
1848         
1849         * dbus/Makefile.am:
1850         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1851         
1852 2003-01-28  Havoc Pennington  <hp@pobox.com>
1853
1854         * dbus/dbus-message.c (check_message_handling): function to check 
1855         on the loaded message, iterates over it etc.
1856
1857 2003-01-28  Havoc Pennington  <hp@pobox.com>
1858
1859         * test/Makefile.am (dist-hook): fix make distdir
1860
1861         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1862
1863 2003-01-27  Havoc Pennington  <hp@pobox.com>
1864
1865         * dbus/dbus-mempool.c (time_for_size): replace printf with 
1866         _dbus_verbose
1867
1868         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1869         empty lines; fix the SAVE_LENGTH stuff to be
1870         START_LENGTH/END_LENGTH so it actually works; couple other 
1871         bugfixes
1872         
1873         * test/Makefile.am (dist-hook): add dist-hook for .message files
1874
1875         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1876         can be constant or locked.
1877         (_dbus_string_free): allow freeing a const string as
1878         documented/intended
1879
1880         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1881
1882         * dbus/dbus-test-main.c (main): take an argument which is the 
1883         directory containing test data
1884
1885         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1886         argument to this and load all the messages in test/data/
1887         checking that they can be loaded or not loaded as appropriate.
1888
1889 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
1890
1891         * bus/dispatch.c: (bus_dispatch_message_handler):
1892         Dispatch messages sent to services.
1893         
1894         * bus/driver.c: (bus_driver_send_service_deleted),
1895         (bus_driver_send_service_created), (bus_driver_send_service_lost),
1896         (bus_driver_send_service_acquired):
1897         Add helper functions for sending service related messages.
1898
1899         (bus_driver_send_welcome_message):
1900         Send HELLO_REPLY instead of WELCOME.
1901         
1902         (bus_driver_handle_list_services):
1903         Send LIST_SERVICES_REPLY instead of SERVICES.
1904         
1905         (bus_driver_handle_own_service),
1906         (bus_driver_handle_service_exists):
1907         New message handlers.
1908         
1909         (bus_driver_handle_message):
1910         Invoke new message handlers.
1911         
1912         (bus_driver_remove_connection):
1913         Don't remove any services here since that's done automatically
1914         by bus_service_remove_owner now.
1915         
1916         * bus/driver.h:
1917         New function signatures.
1918         
1919         * bus/services.c: (bus_service_add_owner):
1920         Send ServiceAcquired message if we're the only primary owner.
1921         
1922         (bus_service_remove_owner):
1923         Send ServiceAcquired/ServiceLost messages.
1924         
1925         (bus_service_set_prohibit_replacement),
1926         (bus_service_get_prohibit_replacement):
1927         Functions for setting prohibit replacement.
1928         
1929         (bus_service_has_owner):
1930         New function that checks if a connection is in the owner queue of 
1931         a certain service.
1932         
1933         * bus/services.h:
1934         Add new function signatures.
1935         
1936         * dbus/dbus-list.c: (_dbus_list_test):
1937         Add tests for _dbus_list_remove_last and traversing the list backwards.
1938         
1939         * dbus/dbus-list.h:
1940         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1941         go any further, so return NULL then.
1942         
1943         * dbus/dbus-protocol.h:
1944         Add new messages, service flags and service replies.
1945         
1946 2003-01-26  Havoc Pennington  <hp@pobox.com>
1947
1948         * dbus/dbus-message-builder.c: implement, completely untested.
1949
1950         * test/data/*: add data to be used in testing. 
1951         ".message" files are our simple loadable text format.
1952         ".message-raw" will be binary dumps of messages.
1953
1954         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1955
1956 2003-01-26  Havoc Pennington  <hp@pobox.com>
1957
1958         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1959
1960         * dbus/dbus-errors.c (dbus_result_to_string): add
1961         file errors
1962
1963         * dbus/dbus-message-builder.c: new file, will contain code to load
1964         up messages from files. Not implemented yet.
1965
1966 2003-01-26  Havoc Pennington  <hp@pobox.com>
1967
1968         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1969         the sender by setting to NULL
1970
1971 2003-01-26  Havoc Pennington  <hp@pobox.com>
1972
1973         The unit tests pass, but otherwise untested.  If it breaks, the
1974         tests should have been better. ;-)
1975         
1976         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
1977         the connection.
1978
1979         * dbus/dbus-message.c: redo everything so we maintain 
1980         message->header as the only copy of the various fields.
1981         This avoids the possibility of out-of-memory in some cases,
1982         for example dbus_message_lock() can't run out of memory anymore,
1983         and avoids extra copying. Figured I may as well go ahead and do 
1984         this since it was busted for dbus_message_lock to not return 
1985         failure on OOM, and dbus_message_write_header was totally
1986         unchecked for OOM. Also fixed some random other bugs.
1987
1988         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
1989         that strings are nul-terminated. Also, end_pos can be equal 
1990         to string length just not greater than, I think.
1991         (_dbus_marshal_set_int32): new function
1992         (_dbus_marshal_set_uint32): new function
1993         (_dbus_marshal_set_string): new function
1994
1995         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
1996         a warning, init timeout_list to NULL
1997         (dbus_connection_send_message): don't use uninitialized variable
1998         "serial"
1999
2000         * dbus/dbus-string.c (_dbus_string_replace_len): new function
2001
2002 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
2003
2004         * bus/driver.c: (bus_driver_handle_hello),
2005         (bus_driver_send_welcome_message):
2006         Plug leaks
2007         
2008 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
2009
2010         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2011         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2012         (dbus_connection_unref):
2013         * dbus/dbus-marshal.c: (_dbus_marshal_test):
2014         * dbus/dbus-message.c: (dbus_message_unref),
2015         Plug memory leaks.
2016         
2017         (dbus_message_get_fields): 
2018         Remove debugging printout.
2019
2020         (_dbus_message_loader_return_buffer):
2021         Don't store the header string.
2022         
2023         (_dbus_message_test):
2024         Plug leaks.
2025
2026 2003-01-26  Richard Hult  <rhult@codefactory.se>
2027
2028         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2029         the file descriptor list, since it can change under us.
2030
2031 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
2032
2033         * glib/dbus-gmain.c: (dbus_connection_prepare),
2034         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2035         (remove_watch), (dbus_connection_hookup_with_g_main):
2036         Rewrite the glib handling to use its own GSource instead of a 
2037         GIOChannel so we can catch messages put in the queue while waiting
2038         for a reply.
2039         
2040 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
2041
2042         * bus/Makefile.am:
2043         * bus/connection.c: (connection_disconnect_handler),
2044         (connection_watch_callback), (bus_connection_setup):
2045         * bus/dispatch.c: (send_one_message),
2046         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2047         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2048         * bus/dispatch.h:
2049         * bus/driver.c: (bus_driver_send_service_deleted),
2050         (bus_driver_send_service_created), (bus_driver_handle_hello),
2051         (bus_driver_send_welcome_message),
2052         (bus_driver_handle_list_services), (bus_driver_remove_connection),
2053         (bus_driver_handle_message):
2054         * bus/driver.h:
2055         Refactor code, put the message dispatching in its own file. Use 
2056         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2057         is disconnected.
2058         
2059 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
2060
2061         * dbus/dbus-internals.h:
2062         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2063         
2064         * dbus/dbus-message.c: (dbus_message_get_sender):
2065         * dbus/dbus-message.h:
2066         Implement dbus_message_get_sender.
2067         
2068         * dbus/dbus-protocol.h:
2069         Add message and service defines.
2070         
2071 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
2072
2073         * dbus/dbus-connection.c: (dbus_connection_send_message):
2074         * dbus/dbus-message-internal.h:
2075         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2076         (dbus_message_write_header):
2077         Remove _dbus_messag_unlock and don't set the client serial on a 
2078         message if one already exists.
2079         
2080 2003-01-24  Havoc Pennington  <hp@pobox.com>
2081
2082         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2083         list_pool
2084
2085         * bus/driver.c (bus_driver_handle_list_services): fix a leak 
2086         on OOM
2087
2088 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
2089
2090         * dbus/dbus-list.c: (alloc_link), (free_link):
2091         Use a memory pool for the links.
2092         
2093 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
2094
2095         * bus/connection.c: (bus_connection_foreach):
2096         * bus/connection.h:
2097         Add new bus_connection_foreach function.
2098         
2099         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2100         Add function that broadcasts a message to all clients.
2101         
2102         (bus_driver_send_service_created), (bus_driver_handle_hello),
2103         (bus_driver_send_welcome_message),
2104         (bus_driver_handle_list_services), (bus_driver_message_handler):
2105         Implement functions that take care of listing services, and notifying
2106         clients when new services are created.
2107         
2108         * bus/services.c: (bus_services_list):
2109         * bus/services.h:
2110         Add new function that returns an array of strings with the currently
2111         registered services.
2112         
2113         * glib/dbus-glib.h:
2114         * glib/dbus-gmain.c:
2115         Update copyright year.
2116         
2117 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
2118
2119         * dbus/dbus-connection.c: (dbus_connection_send_message):
2120         Unlock the message in case it was sent earlier.
2121         
2122         (dbus_connection_send_message_with_reply_and_block):
2123         Remove the reply message from the list.
2124         
2125         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2126         Set array_len and new_pos correctly.
2127         
2128         (_dbus_marshal_test):
2129         Remove debug output.
2130         
2131         * dbus/dbus-message-internal.h:
2132         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2133         New function that returns the reply serial.
2134         
2135         (_dbus_message_unlock):
2136         New function that unlocks a message and resets its header.
2137
2138         (dbus_message_append_string_array), 
2139         (dbus_message_get_fields_valist),
2140         (dbus_message_iter_get_field_type),
2141         (dbus_message_iter_get_string_array),   
2142         (dbus_message_get_fields),      
2143         (dbus_message_append_fields_valist):
2144         Handle string arrays.
2145         
2146         (dbus_message_set_sender):
2147         Make this function public since the bus daemon needs it.
2148         
2149         (decode_header_data):
2150         Set the reply serial to -1 initially.
2151
2152         * dbus/dbus-message.h:
2153         Add dbus_message_set_sender.    
2154
2155 2003-01-24  Havoc Pennington  <hp@pobox.com>
2156
2157         * doc/dbus-specification.sgml: add some stuff
2158
2159 2003-01-22  Havoc Pennington  <hp@pobox.com>
2160
2161         * doc/dbus-specification.sgml: Start to document the protocol.
2162
2163 2003-01-22  Havoc Pennington  <hp@pobox.com>
2164
2165         * dbus/dbus-connection.c
2166         (dbus_connection_send_message_with_reply_and_block): add some @todo
2167
2168         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2169
2170 2003-01-21  Havoc Pennington  <hp@pobox.com>
2171
2172         (patch untested because can't compile)
2173         
2174         * bus/driver.c (create_unique_client_name): make this function
2175         never recycle client names. Also, caller should initialize 
2176         the DBusString.
2177
2178         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2179
2180 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
2181
2182         * dbus/dbus-marshal.c: (_dbus_marshal_double),
2183         (_dbus_marshal_int32), (_dbus_marshal_uint32),
2184         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2185         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2186         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2187         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2188         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2189         * dbus/dbus-marshal.h:
2190         * dbus/dbus-protocol.h:
2191         Add support for marshalling and demarshalling integer, double
2192         and string arrays.
2193         
2194 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
2195
2196         * bus/Makefile.am:
2197         Add driver.[ch]
2198         
2199         * bus/connection.c: (connection_disconnect_handler):
2200         Remove the connection from the bus driver's list.
2201         
2202         (connection_watch_callback): Dispatch messages.
2203
2204         (free_connection_data): Free connection name.
2205         
2206         (bus_connection_setup): Add connection to the bus driver's list.
2207         (bus_connection_remove_owned_service): 
2208         (bus_connection_set_name), (bus_connection_get_name):
2209         Add functions for setting and getting the connection's name.
2210         
2211         * bus/connection.h:
2212         Add function headers.
2213         
2214         * bus/driver.c: (create_unique_client_name),
2215         (bus_driver_handle_hello_message),
2216         (bus_driver_send_welcome_message), (bus_driver_message_handler),
2217         (bus_driver_add_connection), (bus_driver_remove_connection):
2218         * bus/driver.h:
2219         * bus/main.c:
2220         * bus/services.c: (bus_service_free):
2221         * bus/services.h:
2222         New file that handles communication and registreation with the bus
2223         itself. 
2224         
2225 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
2226
2227         * dbus/dbus-connection.c: (dbus_connection_send_message):
2228         Add a new client_serial parameter.
2229         
2230         (dbus_connection_send_message_with_reply):
2231         Remove a @todo since we've implemented the blocking function.
2232         
2233         (dbus_connection_send_message_with_reply_and_block):
2234         New function that sends a message and waits for a reply and
2235         then returns the reply.
2236         
2237         * dbus/dbus-connection.h:
2238         Add new functions.
2239         
2240         * dbus/dbus-errors.c: (dbus_result_to_string):
2241         * dbus/dbus-errors.h:
2242         Add new DBUS_RESULT.
2243         
2244         * dbus/dbus-message-internal.h:
2245         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2246         (_dbus_message_set_sender), (dbus_message_write_header),
2247         (dbus_message_new_reply), (decode_header_data),
2248         (_dbus_message_loader_return_buffer), (_dbus_message_test):
2249         * dbus/dbus-message.h:
2250         Add new functions that set the reply serial and sender.
2251         Also marshal and demarshal them correctly and add test.
2252         
2253         * dbus/dbus-protocol.h:
2254         Add new DBUS_MESSAGE_TYPE_SENDER.
2255         
2256         * glib/dbus-glib.h:
2257         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2258         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2259         (dbus_connection_hookup_with_g_main):
2260         * glib/test-dbus-glib.c: (main):
2261         Rewrite to use GIOChannel and remove the GSource crack.
2262         
2263         * test/echo-client.c: (main):
2264         * test/watch.c: (check_messages):
2265         Update for changed APIs
2266         
2267 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
2268
2269         * dbus/Makefile.am: Add dbus-timeout.[cħ]
2270         
2271         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2272         Create a DBusTimeoutList.       
2273         (dbus_connection_set_timeout_functions): Add new function to
2274         set timeout callbacks
2275         
2276         * dbus/dbus-connection.h: Add public DBusTimeout API.
2277         
2278         * dbus/dbus-message.c: (dbus_message_get_service):
2279         * dbus/dbus-message.h:  New function.
2280
2281         * dbus/dbus-server.c: Fix small doc typo.
2282         
2283         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2284
2285 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
2286
2287         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2288         of the string, just as long as specified.
2289
2290 2003-01-19  Havoc Pennington  <hp@pobox.com>
2291
2292         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2293         new function
2294
2295         * dbus/dbus-server.c (dbus_server_set_max_connections)
2296         (dbus_server_get_max_connections, dbus_server_get_n_connections):
2297         keep track of current number of connections, and add API for
2298         setting a max (but haven't implemented enforcing the max yet)
2299
2300 2003-01-18  Havoc Pennington  <hp@pobox.com>
2301
2302         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2303         reading/writing if read_watch != NULL or write_watch != NULL.
2304
2305         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2306         the message loader code to actually load message->header and
2307         message->body into the newly-created message.
2308
2309         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2310         in OOM case
2311
2312         * dbus/dbus-connection.c (dbus_connection_set_max_message_size) 
2313         (dbus_connection_get_max_message_size) 
2314         (dbus_connection_set_max_live_messages_size) 
2315         (dbus_connection_get_max_live_messages_size): implement some
2316         resource limitation functions
2317
2318         * dbus/dbus-resources.c: new file implementing some of the
2319         resource limits stuff
2320
2321         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2322         missing docs, add @todo to handle OOM etc.
2323
2324         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2325         docs
2326         
2327 2003-01-18  Havoc Pennington  <hp@pobox.com>
2328
2329         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the 
2330         connection if it hasn't been already.
2331
2332         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2333         replace with DisconnectFunction.
2334
2335 2003-01-18  Havoc Pennington  <hp@pobox.com>
2336
2337         Building --disable-verbose-mode --disable-asserts --disable-tests
2338         cuts the library from 112K to 45K or so
2339         
2340         * configure.in: check for varargs macro support, 
2341         add --enable-verbose-mode, --enable-asserts. 
2342
2343         * dbus/dbus-internals.h (_dbus_assert): support
2344         DBUS_DISABLE_ASSERT
2345         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2346
2347 2003-01-18  Havoc Pennington  <hp@pobox.com>
2348
2349         * dbus/dbus-test.c: include config.h so that tests actually run
2350
2351         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2352         so the failure mode when that assumption fails will be plenty
2353         obvious.
2354
2355 2003-01-18  Havoc Pennington  <hp@pobox.com>
2356
2357         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2358
2359         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2360         the distribution
2361
2362         * test/Makefile.am: don't use special variable "TESTS" for echo-*
2363         since we don't want to use those in make check
2364
2365 2003-01-15  Havoc Pennington  <hp@redhat.com>
2366
2367         Release 0.2
2368         
2369         * NEWS: update
2370
2371 2003-01-15  Havoc Pennington  <hp@redhat.com>
2372
2373         * test/Makefile.am: fix so that test source code ends up in the
2374         distribution on make distcheck
2375
2376 2003-01-15  Havoc Pennington  <hp@redhat.com>
2377
2378         Release 0.1.
2379         
2380         * NEWS: update  
2381
2382 2003-01-15  Havoc Pennington  <hp@redhat.com>
2383
2384         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2385         fix build when --disable-tests
2386
2387         * Makefile.am (EXTRA_DIST): put HACKING in here
2388
2389         * HACKING: document procedure for making a tarball release.
2390
2391 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
2392
2393         * bus/connection.c: (connection_error_handler),
2394         (bus_connection_setup):
2395         * bus/main.c: (main):
2396         Make sure that the DBusConnectionData struct is NULLed
2397         out to prevent a segfault.
2398         
2399         * dbus/dbus-errors.c: (dbus_result_to_string):
2400         * dbus/dbus-errors.h:
2401         * dbus/dbus-message.c: (dbus_message_get_fields),
2402         (dbus_message_get_fields_valist), (_dbus_message_test):
2403         * dbus/dbus-message.h:
2404         Make dbus_message_get_fields return a result code so we can
2405         track invalid fields as well as oom.
2406         
2407 2003-01-11  Havoc Pennington  <hp@pobox.com>
2408
2409         * configure.in: change --enable-test/--enable-ansi action-if-given
2410         to enable_foo=$enableval instead of enable_foo=yes
2411
2412 2003-01-08  Havoc Pennington  <hp@pobox.com>
2413
2414         * dbus/dbus-string.c (_dbus_string_align_length): new function
2415
2416         * dbus/dbus-test-main.c: move main() for test app here
2417         * dbus/dbus-test.c
2418         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2419         symbol to run tests, because dbus-test isn't in the main 
2420         library
2421
2422         Code review nitpicks.
2423         
2424         * dbus/dbus-message.c (dbus_message_write_header): add newlines
2425         for people with narrow emacs ;-). Assert client_serial was filled
2426         in. Assert message->name != NULL.
2427         (dbus_message_append_fields): have "first_field_type" arg separate
2428         from va list, needed for C++ binding that also uses varargs IIRC
2429         and helps with type safety
2430         (dbus_message_new): add @todo about using DBusString to store
2431         service/name internally
2432         (dbus_message_new): don't leak ->service and ->name on OOM later
2433         in the function
2434         (dbus_message_unref): free the service name
2435         (dbus_message_get_fields): same change to varargs
2436         i.e. first_field_type
2437         (_dbus_message_loader_return_buffer): assert that the message data
2438         is aligned (if not it's a bug in our code). Put in verbose griping
2439         about why we set corrupted = TRUE.
2440         (decode_header_data): add FIXME that char* is evil.  Was going to
2441         add FIXME about evil locale-specific string.h strncmp, but just
2442         switched to wacky string-as-uint32 optimization. Move check for
2443         "no room for field name" above get_const_data_len() to avoid
2444         assertion failure in get_const_data_len if we have trailing 2
2445         bytes or the like. Check for service and name fields being
2446         provided twice. Don't leak service/name on error. Require field
2447         names to be aligned to 4 bytes.
2448
2449         * dbus/dbus-marshal.c: move byte swap stuff to header
2450         (_dbus_pack_int32): uscore-prefix
2451         (_dbus_unpack_int32): uscore-prefix
2452         (_dbus_unpack_uint32): export
2453         (_dbus_demarshal_string): add @todo complaining about use of
2454         memcpy()
2455         (_dbus_marshal_get_field_end_pos): add @todo about bad error
2456         handling allowing corrupt data to go unchecked
2457
2458 2003-01-08  Havoc Pennington  <hp@redhat.com>
2459
2460         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write 
2461         to the select() as needed for authentication. (should be using
2462         _dbus_poll() not select, but for another day)
2463
2464         * dbus/dbus.h: include dbus/dbus-protocol.h
2465
2466 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
2467
2468         * dbus/Makefile.am (dbusinclude_HEADERS): Install
2469         dbus-connection.h
2470
2471 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
2472
2473         * dbus/dbus-internals.c: (_dbus_type_to_string):
2474         New function that returns a string describing a type.
2475         
2476         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2477         * dbus/dbus-marshal.h:
2478         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2479         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2480         (dbus_message_iter_get_byte_array):
2481         * dbus/dbus-message.h:
2482         Add new convenience functions for appending and getting message fields.
2483         Also add demarshalling routines for byte arrays.
2484
2485 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
2486
2487         * dbus/dbus-connection-internal.h:
2488         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2489         (_dbus_connection_get_next_client_serial),
2490         (dbus_connection_send_message):
2491         * dbus/dbus-internals.h:
2492         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2493         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2494         (_dbus_marshal_uint32), (_dbus_demarshal_double),
2495         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2496         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2497         (_dbus_verbose_bytes), (_dbus_marshal_test):
2498         * dbus/dbus-marshal.h:
2499         * dbus/dbus-message-internal.h:
2500         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2501         (dbus_message_write_header), (_dbus_message_lock),
2502         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2503         (dbus_message_get_name), (dbus_message_append_int32),
2504         (dbus_message_append_uint32), (dbus_message_append_double),
2505         (dbus_message_append_string), (dbus_message_append_byte_array),
2506         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2507         (dbus_message_iter_unref), (dbus_message_iter_has_next),
2508         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2509         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2510         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2511         (decode_header_data), (_dbus_message_loader_return_buffer),
2512         (message_iter_test), (_dbus_message_test):
2513         * dbus/dbus-message.h:
2514         * dbus/dbus-protocol.h:
2515         * dbus/dbus-test.c: (main):
2516         * dbus/dbus-test.h:
2517         * glib/test-dbus-glib.c: (message_handler), (main):
2518         * test/echo-client.c: (main):
2519         * test/watch.c: (check_messages):
2520         Make messages sendable and receivable for real.
2521         
2522 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
2523
2524         * dbus/dbus-marshal.c: (_dbus_marshal_double),
2525         (_dbus_marshal_string), (_dbus_marshal_byte_array):
2526         * dbus/dbus-message.c: (dbus_message_append_int32),
2527         (dbus_message_append_uint32), (dbus_message_append_double),
2528         (dbus_message_append_string), (dbus_message_append_byte_array):
2529         Handle OOM restoration.
2530         
2531 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
2532
2533         * dbus/dbus-marshal.c: (_dbus_marshal_string),
2534         (_dbus_demarshal_string), (_dbus_marshal_test):
2535         * dbus/dbus-marshal.h:
2536         * dbus/dbus-message.c: (dbus_message_get_name),
2537         Document these functions.
2538         
2539         (dbus_message_append_int32), (dbus_message_append_uint32),
2540         (dbus_message_append_double), (dbus_message_append_string),
2541         (dbus_message_append_byte_array):
2542         * dbus/dbus-message.h:
2543         Add functions for adding message fields of different types.
2544         
2545         * dbus/dbus-protocol.h:
2546         Add the different types.
2547
2548 2003-01-05  Havoc Pennington  <hp@pobox.com>
2549
2550         * bus/connection.c: implement routines for handling connections,
2551         first thing is keeping a list of owned services on each connection
2552         and setting up watches etc.
2553
2554         * bus/services.c: implement a mapping from service names to lists
2555         of connections
2556
2557         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2558
2559         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2560         to use static mutexes for global data
2561
2562         * dbus/dbus-connection.c (dbus_connection_set_data): add new
2563         collection of functions to set/get application-specific data
2564         on the DBusConnection.
2565
2566 2003-01-04  Havoc Pennington  <hp@pobox.com>
2567
2568         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
2569         (_dbus_poll): new function
2570
2571         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
2572         copied from GLib
2573
2574         * bus/loop.c: initial code for the daemon main loop
2575
2576 2003-01-04  Havoc Pennington  <hp@pobox.com>
2577
2578         * test/watch.c (error_handler): make it safe if the error handler 
2579         is called multiple times (if we s/error handler/disconnect
2580         handler/ we should just guarantee it's called only once)
2581
2582         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
2583         error handler on disconnect (it's quite possible we should
2584         just change the error handler to a "disconnect handler," I'm 
2585         not sure we have any other meaningful errors)
2586
2587         * configure.in: check for getpwnam_r
2588
2589         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2590         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
2591         mechanism as in SASL spec, using socket credentials
2592
2593         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
2594         (_dbus_send_credentials_unix_socket): new function
2595
2596         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
2597         dbus_accept()
2598         (_dbus_write): only check errno if <0 returned
2599         (_dbus_write_two): ditto
2600
2601 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
2602
2603         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
2604         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
2605         (_dbus_marshal_test):
2606         * dbus/dbus-marshal.h:
2607         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
2608         to _dbus_marshal_utf8_string. Also fix some tests.
2609         
2610 2002-12-28  Harri Porten  <porten@kde.org>
2611
2612         * configure.in: added check for C++ compiler and a very cheesy
2613         check for the Qt integration
2614
2615         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
2616
2617         * qt/Makefile.am: added 
2618
2619         * qt/.cvsignore: added  
2620
2621         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
2622         latter, added #ifdef QT_THREAD_SUPPORT guard.
2623
2624         * dbus/Makefile.am: added missing headers for make dist
2625
2626 2002-12-28  Kristian Rietveld  <kris@gtk.org>
2627
2628         * dbus/Makefile.am: fixup export-symbols-regex.
2629
2630 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
2631
2632         * acinclude.m4: Add this file and put the 
2633         PKG_CHECK_MODULE macro in it.
2634
2635 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
2636
2637         * dbus/dbus-marshal.c: (_dbus_marshal_string),
2638         (_dbus_demarshal_double), (_dbus_demarshal_int32),
2639         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2640         (_dbus_marshal_test):
2641         Make the demarshalling routines align the pos argument.
2642         Add string marshalling tests and fix the obvious bugs 
2643         discovered.
2644         
2645 2002-12-26  Havoc Pennington  <hp@pobox.com>
2646
2647         * dbus/dbus-auth.c: fixes fixes fixes
2648
2649         * dbus/dbus-transport-unix.c: wire up support for
2650         encoding/decoding data on the wire
2651
2652         * dbus/dbus-auth.c (_dbus_auth_encode_data) 
2653         (_dbus_auth_decode_data): append to target string 
2654         instead of nuking it.
2655
2656 2002-12-26  Havoc Pennington  <hp@pobox.com>
2657
2658         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
2659         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
2660         doh
2661
2662         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
2663         avoid swap_bytes() overhead (ignoring possible assembly stuff for 
2664         now). Main point is because I wanted unpack_uint32 to implement
2665         _dbus_verbose_bytes
2666         (_dbus_verbose_bytes): new function
2667
2668         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
2669
2670         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
2671         mechanism to handle a corrupt message stream
2672         (_dbus_message_loader_new): fix preallocation to only prealloc, 
2673         not prelengthen
2674         
2675         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
2676         (_dbus_string_test): enhance tests for copy/move and fix the
2677         functions
2678
2679         * dbus/dbus-transport-unix.c: Hold references in more places to 
2680         avoid reentrancy problems
2681
2682         * dbus/dbus-transport.c: ditto
2683
2684         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
2685         leak reference count in no-message case
2686
2687         * test/watch.c (do_mainloop): handle adding/removing watches
2688         during iteration over the watches. Also, ref the connection/server
2689         stored on a watch, so we don't try to mangle a destroyed one.
2690
2691         * dbus/dbus-transport-unix.c (do_authentication): perform
2692         authentication
2693
2694         * dbus/dbus-auth.c (get_state): add a state
2695         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
2696         (_dbus_auth_get_unused_bytes): append the unused bytes
2697         to the passed in string, rather than prepend
2698
2699         * dbus/dbus-transport.c (_dbus_transport_init_base): create 
2700         the auth conversation DBusAuth
2701
2702         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2703         (_dbus_transport_new_for_domain_socket): when creating a
2704         transport, pass in whether it's a client-side or server-side
2705         transport so we know which DBusAuth to create
2706
2707 2002-12-03  Havoc Pennington  <hp@pobox.com>
2708
2709         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2710         _after_ finalizing the derived members
2711         (unix_connection_set): unref watch if we fail to add it
2712
2713         * dbus/dbus-connection.c (dbus_connection_unref): delete the
2714         transport first, so that the connection owned by the 
2715         transport will be valid as the transport finalizes.
2716
2717         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2718         if necessary, and remove watches from the connection.
2719         
2720         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2721         
2722 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
2723
2724         * dbus/dbus-marshal.c: (_dbus_marshal_string),
2725         (_dbus_demarshal_double), (_dbus_demarshal_int32),
2726         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2727         (_dbus_marshal_test):
2728         * dbus/dbus-marshal.h:
2729         Add string marshal functions and have the demarshal functions
2730         return the new position.
2731         
2732 2002-12-25  Havoc Pennington  <hp@pobox.com>
2733
2734         * doc/dbus-sasl-profile.txt: docs on the authentication protocol, 
2735         it is a simple protocol that just maps directly to SASL.
2736
2737         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2738         initial implementation, not actually used yet.
2739         
2740         * dbus/dbus-string.c (_dbus_string_find): new function
2741         (_dbus_string_equal): new function
2742         (_dbus_string_base64_encode): new function
2743         (_dbus_string_base64_decode): new function
2744
2745 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
2746
2747         * dbus/Makefile.am:
2748         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2749         (_dbus_marshal_int32), (_dbus_marshal_uint32),
2750         (_dbus_demarshal_double), (_dbus_demarshal_int32),
2751         (_dbus_demarshal_uint32), (_dbus_marshal_test):
2752         * dbus/dbus-marshal.h:
2753         * dbus/dbus-protocol.h:
2754         * dbus/dbus-test.c: (main):
2755         * dbus/dbus-test.h:
2756         Add un-optimized marshalling/demarshalling routines.
2757         
2758 2002-12-25  Harri Porten  <porten@kde.org>
2759
2760         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2761
2762 2002-12-24  Zack Rusin  <zack@kde.org>
2763
2764         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2765         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2766         main loop stuff
2767
2768 2002-12-24  Havoc Pennington  <hp@pobox.com>
2769
2770         * glib/dbus-gthread.c: fix include
2771
2772         * glib/dbus-glib.h: rename DBusMessageHandler for now. 
2773         I think glib API needs to change, though, as you don't 
2774         want to use DBusMessageFunction, you want to use the 
2775         DBusMessageHandler object. Probably 
2776         dbus_connection_open_with_g_main_loop()
2777         and dbus_connection_setup_g_main_loop() or something like that
2778         (but think of better names...) that just create a connection 
2779         that has watch/timeout functions etc. already set up.
2780
2781         * dbus/dbus-connection.c
2782         (dbus_connection_send_message_with_reply): new function just to 
2783         show how the message handler helps us deal with replies.
2784
2785         * dbus/dbus-list.c (_dbus_list_remove_last): new function
2786
2787         * dbus/dbus-string.c (_dbus_string_test): free a string that
2788         wasn't
2789
2790         * dbus/dbus-hash.c: use memory pools for the hash entries
2791         (rebuild_table): be more paranoid about overflow, and 
2792         shrink table when we can
2793         (_dbus_hash_test): reduce number of sprintfs and write
2794         valid C89. Add tests for case where we grow and then 
2795         shrink the hash table.
2796
2797         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2798
2799         * dbus/dbus-connection.c (dbus_connection_register_handler) 
2800         (dbus_connection_unregister_handler): new functions
2801
2802         * dbus/dbus-message.c (dbus_message_get_name): new
2803
2804         * dbus/dbus-list.c: fix docs typo
2805
2806         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2807         an object representing a handler for messages.
2808
2809 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
2810
2811         * glib/dbus-glib.h:
2812         * glib/dbus-gthread.c: (dbus_gthread_init):
2813         Don't use the gdbus prefix for public functions.
2814         
2815 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
2816
2817         * Makefile.am:
2818         * configure.in:
2819         Add GLib checks and fixup .pc files
2820         
2821         * glib/Makefile.am:
2822         * glib/dbus-glib.h:
2823         * glib/dbus-gmain.c: (gdbus_connection_prepare),
2824         (gdbus_connection_check), (gdbus_connection_dispatch),
2825         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2826         (dbus_connection_gsource_new):
2827         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2828         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2829         * glib/test-dbus-glib.c: (message_handler), (main):
2830         Add GLib support.
2831         
2832 2002-12-15  Harri Porten  <porten@kde.org>
2833
2834         * autogen.sh: check for libtoolize before attempting to use it 
2835         
2836         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2837         struct.
2838         
2839         * .cvsignore: ignore more stamp files
2840
2841         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2842
2843         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2844         without make install.
2845
2846 2002-12-15  Havoc Pennington  <hp@pobox.com>
2847
2848         * dbus/dbus-threads.c: add thread stubs that a higher library
2849         layer can fill in. e.g. the GLib wrapper might fill them in with
2850         GThread stuff. We still need to use this thread API to
2851         thread-safe-ize the library.
2852
2853 2002-12-12  Havoc Pennington  <hp@pobox.com>
2854
2855         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2856         below new interfaces and include fewer system headers.
2857
2858         * dbus/dbus-sysdeps.c (_dbus_read): new function
2859         (_dbus_write): new function
2860         (_dbus_write_two): new function
2861         (_dbus_connect_unix_socket): new function
2862         (_dbus_listen_unix_socket): new function
2863
2864         * dbus/dbus-message-internal.h: change interfaces to use
2865         DBusString
2866
2867 2002-12-11  Havoc Pennington  <hp@pobox.com>
2868
2869         * dbus/dbus-types.h: add dbus_unichar
2870
2871         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2872
2873         * dbus/dbus-connection.c (dbus_connection_send_message): return
2874         TRUE on success
2875
2876         * dbus/dbus-transport.c: include dbus-watch.h   
2877
2878         * dbus/dbus-connection.c: include dbus-message-internal.h
2879
2880         * HACKING: add file with coding guidelines stuff.
2881
2882         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2883         handling here, for security purposes (as in vsftpd). Not actually
2884         using this class yet.
2885
2886         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2887         system/libc usage here, as in vsftpd, for ease of auditing (and
2888         should also simplify portability). Haven't actually moved all the
2889         system/libc usage into here yet.
2890         
2891 2002-11-25  Havoc Pennington  <hp@pobox.com>
2892
2893         * dbus/dbus-internals.c (_dbus_verbose): fix to not 
2894         always print the first verbose message.
2895
2896 2002-11-24  Havoc Pennington  <hp@pobox.com>
2897
2898         * test/echo-client.c, test/echo-server.c: cheesy test 
2899         clients.
2900         
2901         * configure.in (AC_CHECK_FUNCS): check for writev
2902
2903         * dbus/dbus-message.c (_dbus_message_get_network_data): new
2904         function
2905
2906         * dbus/dbus-list.c (_dbus_list_foreach): new function
2907
2908         * dbus/dbus-internals.c (_dbus_verbose): new function
2909
2910         * dbus/dbus-server.c, dbus/dbus-server.h: public object
2911         representing a server that listens for connections.
2912
2913         * dbus/.cvsignore: create
2914
2915         * dbus/dbus-errors.h, dbus/dbus-errors.c:
2916         public API for reporting errors
2917
2918         * dbus/dbus-connection.h, dbus/dbus-connection.c:
2919         public object representing a connection that 
2920         sends/receives messages. (Same object used for 
2921         both client and server.)
2922
2923         * dbus/dbus-transport.h, dbus/dbus-transport.c:
2924         Basic abstraction for different kinds of stream
2925         that we might read/write messages from.
2926
2927 2002-11-23  Havoc Pennington  <hp@pobox.com>
2928
2929         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN 
2930         _DBUS_INT_MAX
2931
2932         * dbus/dbus-test.c (main): add list test, and include 
2933         dbus-test.h as intended
2934
2935         * dbus/dbus-hash.c (_dbus_hash_table_remove_string) 
2936         (_dbus_hash_table_remove_int): return value indicates 
2937         whether the entry existed to remove
2938
2939         * dbus/dbus-list.c: add linked list utility class, 
2940         with docs and tests
2941
2942         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket 
2943         array sometimes.
2944
2945 2002-11-23  Havoc Pennington  <hp@pobox.com>
2946
2947         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2948         DBUS_END_DECLS to nothing, that should fix this once and for all
2949
2950         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2951
2952         * dbus/dbus-message.c, dbus/dbus-hash.c: 
2953         add some missing @brief
2954
2955 2002-11-23  Havoc Pennington  <hp@pobox.com>
2956
2957         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS 
2958         to avoid confusing Doxygen
2959
2960         * dbus/dbus-hash.c: @} not }@
2961
2962         * dbus/dbus-message.c (struct DBusMessage): split out 
2963         internals docs
2964
2965 2002-11-23  Havoc Pennington  <hp@pobox.com>
2966
2967         * configure.in: pile on more warning flags if using gcc
2968
2969         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have 
2970         to document static functions
2971
2972         * configure.in: add summary to end of configure so it 
2973         looks nice and attractive
2974
2975         * dbus/dbus-hash.c: finish implementation and write unit 
2976         tests and docs
2977
2978         * configure.in: add --enable-tests to enable unit tests
2979
2980         * dbus/dbus-test.c: test program to run unit tests 
2981         for all files in dbus/*, initially runs a test for 
2982         dbus-hash.c
2983         
2984         * dbus/dbus-internals.h: file to hold some internal utility stuff
2985
2986 2002-11-22  Havoc Pennington  <hp@redhat.com>
2987
2988         * dbus/dbus-hash.c: copy in Tcl hash table, not yet 
2989         "ported" away from Tcl
2990
2991         * dbus/dbus-types.h: header for types such as dbus_bool_t
2992
2993 2002-11-22  Havoc Pennington  <hp@redhat.com>
2994
2995         * dbus/dbus.h: fixups for doc warnings
2996
2997         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up 
2998         macros
2999         (QUIET): make it quiet so we can see warnings
3000
3001         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3002
3003 2002-11-22  Havoc Pennington  <hp@redhat.com>
3004
3005         * Makefile.am: include "Doxyfile" target in all-local
3006
3007         * configure.in: generate the Doxyfile
3008
3009         * Doxyfile.in: move Doxyfile here, so we can use 
3010         configure to generate a Doxyfile with the right 
3011         version number etc.
3012
3013 2002-11-22  Havoc Pennington  <hp@redhat.com>
3014
3015         * dbus/dbus-message.c: move inline docs into .c file
3016
3017         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3018         so all docs are under doc/
3019         (MAN_EXTENSION): generate man pages. Use extension 
3020         ".3dbus" which matches ".3qt" on my system, 
3021         I guess this is OK, I don't know really.
3022         (FILE_PATTERNS): look for .c files not .h, makes sense
3023         for plain C I think
3024
3025 2002-11-22  Havoc Pennington  <hp@pobox.com>
3026
3027         * Makefile.am (SUBDIRS): rename subdir "server" to "bus" 
3028         because any app can be a server, and any app can be a client, 
3029         the bus is a special kind of server.
3030
3031 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
3032
3033         * Doxyfile : adding. Still needs Makefile rules to be generated
3034         automatically (just run "doxygen" in the toplevel dir for now to
3035         generate docs)
3036         
3037         * dbus/dbus-message.h : Adding sample docs (javadoc since
3038         resembles gtk-doc a little more)
3039
3040         * dbus/dbus.h : Adding sample docs
3041
3042 2002-11-21  Havoc Pennington  <hp@redhat.com>
3043
3044         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION 
3045         so we can allow ourselves to include files directly, 
3046         instead of having to use dbus.h
3047
3048         * dbus/dbus.h: fill in
3049
3050         * dbus/dbus-message.h: sketch out a sample header file.
3051         Include griping if you include it directly instead of 
3052         via dbus.h
3053
3054         * dbus/dbus-macros.h: new file with macros for extern "C", 
3055         TRUE/FALSE, NULL, etc.
3056
3057         * doc/file-boilerplate.c: put include guards in here
3058
3059 2002-11-21  Havoc Pennington  <hp@redhat.com>
3060
3061         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3062
3063         * COPYING: include the GPL as well, and license code 
3064         under both AFL and GPL.
3065
3066 2002-11-21  Havoc Pennington  <hp@redhat.com>
3067
3068         * acconfig.h: get rid of this
3069
3070         * autogen.sh (run_configure): add --no-configure option
3071
3072         * configure.in: remove AC_ARG_PROGRAM to make
3073         autoconf complain less. add AC_PREREQ. 
3074         add AC_DEFINE third arg.
3075         
3076 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
3077
3078         * doc/Makefile.am:
3079         Fix references so we can distcheck.
3080
3081 2002-11-21  Havoc Pennington  <hp@redhat.com>
3082
3083         * Initial module creation
3084