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