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