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