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