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