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