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