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