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