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