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