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