1 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
7 2003-02-17 Anders Carlsson <andersca@codefactory.se>
9 * doc/dbus-specification.sgml:
10 Specification updates.
12 2003-02-17 Anders Carlsson <andersca@codefactory.se>
14 * bus/activation.c: (bus_activation_init), (child_setup),
15 (bus_activation_activate_service):
18 Set DBUS_ADDRESS environment variable.
20 * dbus/dbus-errors.c: (dbus_set_error):
21 Don't use va_copy since that's a C99 feature.
23 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
25 * dbus/dbus-sysdeps.h:
26 Add child_setup_func to _dbus_spawn_async.
28 * doc/dbus-specification.sgml:
31 * test/spawn-test.c: (setup_func), (main):
34 2003-02-17 Alexander Larsson <alexl@redhat.com>
36 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
39 2003-02-17 Anders Carlsson <andersca@codefactory.se>
43 * doc/dbus-test-plan.sgml:
44 Add test plan document.
49 2003-02-17 Anders Carlsson <andersca@codefactory.se>
51 * dbus/dbus-message.c: (decode_header_data),
52 (_dbus_message_loader_return_buffer):
53 Set the header padding amount when loading a message.
55 2003-02-16 Anders Carlsson <andersca@codefactory.se>
57 * bus/dispatch.c: (send_one_message):
58 Only send broadcast messages to registered connections.
60 * dbus/dbus-message.c: (dbus_message_name_is):
61 * dbus/dbus-message.h:
62 New convenience function.
64 * dbus/dbus-transport-debug.c: (do_reading):
65 Only dispatch one message per run.
68 * test/bus-test.c: (new_connection_callback), (die),
69 (test_hello_client1_handler), (test_hello_client2_handler),
70 (test_hello_replies), (main):
72 * test/bus-test-loop.[ch]:
75 2003-02-16 Havoc Pennington <hp@pobox.com>
77 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
80 2003-02-16 Alexander Larsson <alexl@redhat.com>
82 * dbus/dbus-connection.c:
83 Implement sent_message_with_reply. (with_reply_and block is still
85 Made dispatch_message not lose message if OOM.
88 Add NoReply error (for reply timeouts).
90 2003-02-16 Alexander Larsson <alexl@redhat.com>
92 * dbus/dbus-hash.c (_dbus_hash_table_unref):
93 Actually free keys and values when destroying hashtable.
95 2003-02-16 Anders Carlsson <andersca@codefactory.se>
97 * dbus/dbus-auth.c: (client_try_next_mechanism):
100 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
101 Return TRUE if there's no thread implementation around.
103 * glib/dbus-gmain.c: (free_source),
104 (dbus_connection_hookup_with_g_main):
105 Make sure to remove the GSource when the connection is finalized.
107 2003-02-16 Anders Carlsson <andersca@codefactory.se>
109 * bus/dispatch.c: (bus_dispatch_message_handler):
110 * dbus/dbus-errors.h:
111 Return an error if someone tries to send a message to a service
114 2003-02-16 Anders Carlsson <andersca@codefactory.se>
116 * bus/activation.c: (load_directory), (bus_activation_init),
117 (bus_activation_activate_service):
120 (bus_driver_handle_activate_service), (bus_driver_handle_message):
121 More work on the activation handling.
123 * dbus/dbus-errors.h:
124 Add some error messages
126 * dbus/dbus-message.c: (dbus_message_new_error_reply):
127 * dbus/dbus-message.h:
128 New function that creates an error message.
130 * dbus/dbus-protocol.h:
131 Add ACTIVATE_SERVER message.
133 * dbus/dbus-server-unix.c: (unix_handle_watch),
134 (_dbus_server_new_for_domain_socket):
135 Call _dbus_fd_set_close_on_exec.
137 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
138 (_dbus_spawn_async), (_dbus_disable_sigpipe),
139 (_dbus_fd_set_close_on_exec):
140 * dbus/dbus-sysdeps.h:
141 Add _dbus_fd_set_close_on exec function. Also add function that checks
142 that all open fds are set to close-on-exec and warns otherwise.
144 * dbus/dbus-transport-unix.c:
145 (_dbus_transport_new_for_domain_socket):
146 Call _dbus_fd_set_close_on_exec.
148 2003-02-16 Havoc Pennington <hp@pobox.com>
150 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
151 allow people to avoid setting SIGPIPE to SIG_IGN
152 (_dbus_connection_new_for_transport): disable SIGPIPE unless
153 we've been asked not to
155 2003-02-15 Anders Carlsson <andersca@codefactory.se>
157 * dbus/dbus-list.c: (_dbus_list_append_link),
158 (_dbus_list_prepend_link):
159 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
163 2003-02-15 Anders Carlsson <andersca@codefactory.se>
166 * bus/activation.c: (bus_activation_entry_free),
167 (add_desktop_file_entry), (load_directory), (bus_activation_init):
169 * bus/main.c: (main):
170 Add simple activation support, doesn't work yet though.
172 2003-02-15 Zack Rusin <zack@kde.org>
174 * qt/dbus-qthread.cpp: small casting fix
176 2003-02-15 Anders Carlsson <andersca@codefactory.se>
178 * dbus/dbus-errors.c: (dbus_set_error):
179 * dbus/dbus-errors.h:
180 Add a few errors and make dbus_set_error void.
182 * dbus/dbus-sysdeps.c:
183 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
184 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
185 * dbus/dbus-sysdeps.h:
186 Add _dbus_spawn_async.
188 * test/spawn-test.c: (main):
189 Test for _dbus_spawn_async.
191 2003-02-15 Anders Carlsson <andersca@codefactory.se>
193 * dbus/dbus-internals.h:
194 Fix build without tests.
196 * dbus/dbus-list.c: (alloc_link):
197 Fix a segfault when a malloc fails.
199 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
200 (dbus_malloc0), (dbus_realloc):
201 Add support for malloc debugging.
203 2003-02-15 Alexander Larsson <alexl@redhat.com>
205 * dbus/dbus-threads.c:
206 * dbus/dbus-threads.h:
207 Add condvars. Remove static mutext from API.
208 Implement static mutexes by initializing them from threads_init.
210 * glib/dbus-gthread.c:
211 * qt/dbus-qthread.cpp:
212 Update with the thread api changes.
217 Turn StaticMutex into normal mutex + init function.
218 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
219 _dbus_list_append_link, _dbus_list_prepend_link
222 * dbus/dbus-sysdeps.c:
223 * dbus/dbus-sysdeps.h:
224 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
225 _dbus_atomic_dec. Only slow fallback implementation at the moment.
227 * dbus/dbus-protocol.h:
228 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
230 * dbus/dbus-message.c:
231 Make ref/unref atomic.
234 * dbus/dbus-connection-internal.h:
235 * dbus/dbus-connection.c:
236 * dbus/dbus-connection.h:
238 Change _peek to _borrow,_return & _steal_borrowed.
239 Change disconnect callback to event.
240 Make dbus_connection_dispatch_messages reentrant.
242 * dbus/dbus-transport.c:
243 Don't ref the connection on calls to the transport
246 * dbus/dbus-message-handler.c:
250 Don't use peek_message anymore
253 * test/debug-thread.c:
254 * test/debug-thread.h:
255 Simple thread implementation that asserts() on deadlocks in
256 single-threaded code.
259 (main) Call debug_threads_init.
262 Use disconnect message instead of disconnect callback.
266 Don't call dbus_connection_set_disconnect_function. Instead export
267 bus_connection_disconnect.
270 Call bus_connection_disconnect when we get a disconnected message.
272 2003-02-15 Havoc Pennington <hp@pobox.com>
274 * dbus/dbus-message.c (dbus_message_new): fool around with the
277 2003-02-14 Havoc Pennington <hp@pobox.com>
279 * dbus/dbus-mempool.c: fail if the debug functions so indicate
281 * dbus/dbus-memory.c: fail if the debug functions indicate we
284 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
285 (_dbus_decrement_fail_alloc_counter): debug functions to
286 simulate memory allocation failures
288 2003-02-14 Havoc Pennington <hp@pobox.com>
290 * dbus/dbus-errors.h (struct DBusError): add a word of padding
293 2003-02-13 Anders Carlsson <andersca@codefactory.se>
295 * bus/driver.c: (bus_driver_handle_hello):
297 * bus/services.c: (bus_service_lookup):
298 Reorder message sending so we get a more sane order.
300 * test/bus-test.c: (message_handler):
303 2003-02-13 Anders Carlsson <andersca@codefactory.se>
305 * bus/driver.c: (bus_driver_send_service_deleted),
306 (bus_driver_send_service_created), (bus_driver_send_service_lost),
307 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
308 (bus_driver_send_welcome_message),
309 (bus_driver_handle_list_services),
310 (bus_driver_handle_acquire_service),
311 (bus_driver_handle_service_exists):
312 * dbus/dbus-bus.c: (dbus_bus_register_client),
313 (dbus_bus_acquire_service), (dbus_bus_service_exists):
314 * dbus/dbus-errors.c: (dbus_result_to_string):
315 * dbus/dbus-errors.h:
316 * dbus/dbus-message.c: (dbus_message_append_args),
317 (dbus_message_append_args_valist), (dbus_message_get_args),
318 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
319 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
320 (dbus_message_iter_get_byte_array),
321 (dbus_message_iter_get_string_array), (message_iter_test),
322 (check_message_handling), (_dbus_message_test):
323 * dbus/dbus-message.h:
324 * test/bus-test.c: (main):
325 Change fields to arguments in messages, so that they won't be
326 confused with header fields.
328 * glib/test-dbus-glib.c: (main):
329 Remove append_fields from hello message.
331 2003-02-13 Anders Carlsson <andersca@codefactory.se>
333 * dbus/dbus-errors.c:
334 * dbus/dbus-message.c:
335 * dbus/dbus-string.c:
338 2003-02-13 Anders Carlsson <andersca@codefactory.se>
340 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
342 Implement support for timeouts in dbus-glib.
344 2003-02-13 Anders Carlsson <andersca@codefactory.se>
346 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
347 * dbus/dbus-message.c: (process_test_subdir):
348 * test/break-loader.c: (find_breaks_based_on):
349 Plug some memory leaks.
351 2003-02-13 Richard Hult <rhult@codefactory.se>
353 * bus/main.c: Fix build.
355 * dbus/dbus-errors.h:
356 * dbus/dbus-errors.c: Fix copyright for Anders.
358 2003-02-13 Anders Carlsson <andersca@codefactory.se>
363 * bus/connection.c: (bus_connection_foreach):
366 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
367 (unescape_string), (new_section), (parse_section_start),
368 (parse_key_value), (report_error), (bus_desktop_file_load),
369 (bus_desktop_file_get_string):
370 * bus/desktop-file.h:
371 Use DBusError for error reporting.
373 * bus/dispatch.c: (send_one_message),
374 (bus_dispatch_message_handler):
375 * bus/driver.c: (bus_driver_send_service_deleted),
376 (bus_driver_send_service_created), (bus_driver_send_service_lost),
377 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
378 (bus_driver_send_welcome_message),
379 (bus_driver_handle_list_services),
380 (bus_driver_handle_acquire_service),
381 (bus_driver_handle_service_exists):
382 * bus/loop.c: (bus_loop_run):
384 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
386 * bus/utils.c: (bus_wait_for_memory):
388 New files with general utility functions.
390 * dbus/dbus-internals.h:
391 Remove _DBUS_HANDLE_OOM.
393 2003-02-13 Anders Carlsson <andersca@codefactory.se>
395 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
396 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
397 * dbus/dbus-errors.h:
398 Add DBusError structure.
400 2003-02-13 Anders Carlsson <andersca@codefactory.se>
402 * test/data/valid-messages/standard-acquire-service.message:
403 * test/data/valid-messages/standard-hello.message:
404 * test/data/valid-messages/standard-list-services.message:
405 * test/data/valid-messages/standard-service-exists.message:
406 Add some standard messages.
408 2003-02-13 Anders Carlsson <andersca@codefactory.se>
410 * bus/driver.c: (bus_driver_send_welcome_message),
411 (bus_driver_handle_list_services),
412 (bus_driver_handle_acquire_service),
413 (bus_driver_handle_service_exists), (bus_driver_handle_message):
414 Update for API changes in libdbus.
416 * dbus/dbus-message.c: (dbus_message_new_reply):
417 * dbus/dbus-message.h:
418 Remove the name argument. The spec states that replies shouldn't
421 2003-02-13 Anders Carlsson <andersca@codefactory.se>
423 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
424 (report_error), (bus_desktop_file_load), (lookup_section),
425 (lookup_line), (bus_desktop_file_get_raw),
426 (bus_desktop_file_get_string):
427 * bus/desktop-file.h:
428 Some fixes, and new functions for getting a key value from a section.
430 2003-02-13 Havoc Pennington <hp@pobox.com>
432 * test/data/auth/fail-after-n-attempts.auth-script: new test
434 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
437 2003-02-13 Havoc Pennington <hp@pobox.com>
439 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
440 dbus_credentials_match were backward
442 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
443 NO_CREDENTIALS and ROOT_CREDENTIALS
445 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
446 into here. Never process more commands after we've reached an
447 end state; store further data as unused bytes.
449 * test/data/auth/*: add more auth tests
451 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
452 command to match exact string and EXPECT_UNUSED to match unused
455 * test/Makefile.am (dist-hook): fix to dist all the test stuff
457 2003-02-12 Havoc Pennington <hp@pobox.com>
459 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
460 \r off of popped lines
462 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
465 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
468 2003-02-12 Havoc Pennington <hp@pobox.com>
470 * dbus/Makefile.am: remove break-loader from the build, since it
473 * configure.in: add --enable-gcov to turn on coverage profiling
474 flags and disable optimization
476 2003-02-10 Havoc Pennington <hp@pobox.com>
478 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
479 initial cut at test framework for DBusAuth from laptop.
480 Doesn't quite work yet but it compiles and I need to get
481 it off the 266mhz laptop. ;-)
483 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
484 fix a memleak in error case
486 2003-02-12 Anders Carlsson <andersca@codefactory.se>
489 * bus/desktop-file.c:
490 * bus/desktop-file.h:
491 Add a desktop file parser.
493 2003-02-11 Zack Rusin <zack@kde.org>
495 * qt/message.[h|cpp]: sample implementation
496 of the KDE wrapper for DBusMessage
498 2003-02-09 Zack Rusin <zack@kde.org>
500 * test/bus-test.c: make_it_compile
501 * doc/dbus-specification.sgml: minimal semantic fix
503 2003-02-06 Anders Carlsson <andersca@codefactory.se>
509 2003-02-06 Anders Carlsson <andersca@codefactory.se>
512 * dbus/dbus-break-loader.c:
514 * test/break-loader.c:
515 Move dbus-break-loader to test/ and rename it to break-loader.
517 2003-02-02 Havoc Pennington <hp@pobox.com>
519 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
520 for code to manage cookies in your home directory
522 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
524 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
525 to authenticate, then disconnect the client.
527 2003-02-03 Alexander Larsson <alexl@redhat.com>
529 * dbus/dbus-message.c (dbus_message_append_fields):
532 2003-02-02 Anders Carlsson <andersca@codefactory.se>
534 * doc/dbus-specification.sgml:
535 Update address format section.
537 2003-02-02 Anders Carlsson <andersca@codefactory.se>
540 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
541 (message_handler), (new_connection_callback), (loop_quit),
545 2003-02-02 Anders Carlsson <andersca@codefactory.se>
547 * bus/driver.c: (bus_driver_handle_service_exists):
548 Simplify the code a bit.
550 * dbus/dbus-bus.c: (dbus_bus_service_exists):
553 2003-02-02 Anders Carlsson <andersca@codefactory.se>
556 Add libdbus-daemon.la and link to it.
558 2003-02-01 James Willcox <jwillcox@gnome.org>
560 * bus/driver.c: (bus_driver_handle_own_service):
561 Actually include the service reply code in the message.
563 2003-02-02 Anders Carlsson <andersca@codefactory.se>
565 * bus/driver.c: (bus_driver_handle_service_exists):
566 Don't unref the incoming message.
568 2003-02-02 Anders Carlsson <andersca@codefactory.se>
570 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
572 2003-02-02 Anders Carlsson <andersca@codefactory.se>
574 * dbus/dbus-server.c: (dbus_server_listen):
575 * dbus/dbus-transport.c: (_dbus_transport_open):
576 ifdef out the calls to the debug transport and server.
578 2003-02-02 Alexander Larsson <alexl@redhat.com>
580 * dbus/dbus-watch.c (dbus_watch_get_flags):
581 Add note in the docs that ERROR or HANGUP won't be returned
582 and are assumed always on.
584 * glib/dbus-gmain.c (add_watch):
585 Always add IO_ERR | IO_HUP
587 * dbus/dbus-message.h:
588 Add semicolon after dbus_message_iter_get_string_array().
589 Makes qt code build again
591 2003-02-01 Anders Carlsson <andersca@codefactory.se>
593 * bus/driver.c: (create_unique_client_name),
594 (bus_driver_handle_hello):
595 Don't take a name, just use a numeric id to identify
599 * dbus/dbus-bus.c: (dbus_bus_register_client),
600 (dbus_bus_acquire_service), (dbus_bus_service_exists):
602 Add new convenience functions for communicating with the bus.
604 * dbus/dbus-message.h:
606 * dbus/dbus-protocol.h:
609 2003-02-01 Alexander Larsson <alexl@redhat.com>
611 * dbus/dbus-message.c (dbus_message_append_fields):
612 Add some more doc comments.
614 2003-02-01 Havoc Pennington <hp@pobox.com>
616 * dbus/dbus-break-loader.c (randomly_modify_length): change
617 a 4-byte value in the message as if it were a length
619 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
620 execute bit on saved files
622 2003-02-01 Havoc Pennington <hp@pobox.com>
624 * dbus/dbus-break-loader.c (main): new program to find messages
625 that break the loader.
627 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
628 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
630 * dbus/dbus-string.c (_dbus_string_set_byte): new
632 2003-01-31 Havoc Pennington <hp@pobox.com>
634 * dbus/dbus-message.c: refactor the test code to be more general,
635 in preparation for writing a "randomly permute test cases to
636 try to break the loader" program.
638 2003-01-31 Havoc Pennington <hp@pobox.com>
640 * doc/dbus-specification.sgml: work on the specification
642 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
643 the protocol version of the message.
645 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
646 no longer specifies that.
647 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
650 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
651 "break" for DBUS_TYPE_NIL, remove @todo
653 2003-01-31 Havoc Pennington <hp@pobox.com>
655 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
656 just set_is_error/get_is_error as this is a commonly-used
657 function, and write docs.
659 2003-01-31 Anders Carlsson <andersca@codefactory.se>
661 * dbus/dbus-address.c: (dbus_address_entry_free):
662 Free key and value lists.
664 * dbus/dbus-internals.c: (_dbus_type_to_string):
665 Add the types we didn't have.
667 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
668 (_dbus_marshal_validate_arg):
671 * dbus/dbus-message.c: (dbus_message_set_sender):
672 Remove todo about being able to set sender to NULL.
674 (dbus_message_set_is_error_reply),
675 (dbus_message_get_is_error_reply):
676 * dbus/dbus-message.h:
679 * dbus/dbus-protocol.h:
680 Add error reply flag.
682 * test/data/valid-messages/opposite-endian.message:
683 Add NIL type to test.
685 2003-01-31 Havoc Pennington <hp@pobox.com>
687 * doc/dbus-specification.sgml: fully specify the header. Add
688 flags and major protocol version, and change header/body len to
691 * dbus/dbus-message-builder.c (append_saved_length): append length
694 * dbus/dbus-message.c (dbus_message_create_header): change header
695 length and body length to unsigned. Add the new fields from the
697 (_dbus_message_loader_return_buffer): unsigned header/body len
699 2003-01-30 Havoc Pennington <hp@pobox.com>
701 * dbus/dbus-auth.c: rework to use only REJECTED, no
704 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
705 use REJECTED, suggested by Mark McLoughlin
707 2003-01-30 Havoc Pennington <hp@pobox.com>
709 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
710 a better way to report errors here. e.g. "unix address lacks
711 path" or something. also "no such file" when the path doesn't
714 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
716 (dbus_parse_address): add @todo about documenting address format,
717 and allowing , and ; to be escaped
719 2003-01-30 Anders Carlsson <andersca@codefactory.se>
722 Add dbus-address.[ch]
724 * dbus/dbus-address.c: (dbus_address_entry_free),
725 (dbus_address_entries_free), (create_entry),
726 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
727 (dbus_parse_address), (_dbus_address_test):
728 * dbus/dbus-address.h:
729 New files for dealing with address parsing.
731 * dbus/dbus-connection.c:
732 Document timeout functions.
734 * dbus/dbus-message.c:
735 Document dbus_message_new_from_message.
737 * dbus/dbus-server-debug.c:
740 * dbus/dbus-server.c: (dbus_server_listen):
741 Parse address and use correct server implementation.
743 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
744 * dbus/dbus-string.h:
745 New function with test.
747 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
751 * dbus/dbus-transport-debug.c:
754 * dbus/dbus-transport.c: (_dbus_transport_open):
755 Parse address and use correct transport implementation.
757 2003-01-30 Havoc Pennington <hp@pobox.com>
759 * dbus/dbus-message.c: use message->byte_order instead of
760 DBUS_COMPILER_BYTE_ORDER throughout.
761 (dbus_message_create_header): pad header to align the
762 start of the body of the message to 8-byte boundary
764 * dbus/dbus-marshal.h: make all the demarshalers take const
765 DBusString arguments.
767 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
768 validate message args here, so we don't have to do slow validation
769 later, and so we catch bad messages as they are incoming. Also add
770 better checks on header_len and body_len. Also fill in
773 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
774 implemented properly)
775 (_dbus_string_validate_nul): new function to check all-nul
777 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
778 get_arg_end_pos and remove all validation
779 (_dbus_marshal_validate_arg): actually do validation here.
781 2003-01-29 Havoc Pennington <hp@pobox.com>
783 * dbus/dbus-message.c (check_message_handling): fix assertion
784 failure on set_client_serial
786 2003-01-28 Havoc Pennington <hp@pobox.com>
788 * dbus/dbus-server-debug.c: Add doc section comments
790 * dbus/dbus-transport-debug.c: add doc section comments
792 2003-01-28 Havoc Pennington <hp@redhat.com>
794 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
795 the reverse order from how I had it
796 (_dbus_string_base64_encode): reverse encoding order. I was
797 basically byteswapping everything during encoding.
799 2003-01-28 Anders Carlsson <andersca@codefactory.se>
801 * dbus/dbus-connection-internal.h:
802 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
803 (_dbus_connection_remove_timeout):
804 Add functions for adding and removing timeouts.
806 * dbus/dbus-message.c: (dbus_message_new_from_message):
807 Add new function that takes a message and creates an exact
808 copy of it, but with the refcount set to 1.
809 (check_message_handling):
812 * dbus/dbus-server-protected.h:
813 * dbus/dbus-server.c: (_dbus_server_init_base),
814 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
815 (dbus_server_set_timeout_functions):
816 (_dbus_server_remove_timeout):
817 New functions so that a server can add and remove timeouts.
819 (dbus_server_listen):
820 Add commented out call to dbus_server_debug_new.
822 * dbus/dbus-timeout.c: (_dbus_timeout_new):
823 Actually set the handler, doh.
825 * dbus/dbus-transport.c: (_dbus_transport_open):
826 Add commented out call to dbus_transport_debug_client_new.
829 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
831 2003-01-28 Havoc Pennington <hp@pobox.com>
833 * dbus/dbus-message.c (check_message_handling): function to check
834 on the loaded message, iterates over it etc.
836 2003-01-28 Havoc Pennington <hp@pobox.com>
838 * test/Makefile.am (dist-hook): fix make distdir
840 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
842 2003-01-27 Havoc Pennington <hp@pobox.com>
844 * dbus/dbus-mempool.c (time_for_size): replace printf with
847 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
848 empty lines; fix the SAVE_LENGTH stuff to be
849 START_LENGTH/END_LENGTH so it actually works; couple other
852 * test/Makefile.am (dist-hook): add dist-hook for .message files
854 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
855 can be constant or locked.
856 (_dbus_string_free): allow freeing a const string as
859 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
861 * dbus/dbus-test-main.c (main): take an argument which is the
862 directory containing test data
864 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
865 argument to this and load all the messages in test/data/
866 checking that they can be loaded or not loaded as appropriate.
868 2003-01-27 Anders Carlsson <andersca@codefactory.se>
870 * bus/dispatch.c: (bus_dispatch_message_handler):
871 Dispatch messages sent to services.
873 * bus/driver.c: (bus_driver_send_service_deleted),
874 (bus_driver_send_service_created), (bus_driver_send_service_lost),
875 (bus_driver_send_service_acquired):
876 Add helper functions for sending service related messages.
878 (bus_driver_send_welcome_message):
879 Send HELLO_REPLY instead of WELCOME.
881 (bus_driver_handle_list_services):
882 Send LIST_SERVICES_REPLY instead of SERVICES.
884 (bus_driver_handle_own_service),
885 (bus_driver_handle_service_exists):
886 New message handlers.
888 (bus_driver_handle_message):
889 Invoke new message handlers.
891 (bus_driver_remove_connection):
892 Don't remove any services here since that's done automatically
893 by bus_service_remove_owner now.
896 New function signatures.
898 * bus/services.c: (bus_service_add_owner):
899 Send ServiceAcquired message if we're the only primary owner.
901 (bus_service_remove_owner):
902 Send ServiceAcquired/ServiceLost messages.
904 (bus_service_set_prohibit_replacement),
905 (bus_service_get_prohibit_replacement):
906 Functions for setting prohibit replacement.
908 (bus_service_has_owner):
909 New function that checks if a connection is in the owner queue of
913 Add new function signatures.
915 * dbus/dbus-list.c: (_dbus_list_test):
916 Add tests for _dbus_list_remove_last and traversing the list backwards.
919 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
920 go any further, so return NULL then.
922 * dbus/dbus-protocol.h:
923 Add new messages, service flags and service replies.
925 2003-01-26 Havoc Pennington <hp@pobox.com>
927 * dbus/dbus-message-builder.c: implement, completely untested.
929 * test/data/*: add data to be used in testing.
930 ".message" files are our simple loadable text format.
931 ".message-raw" will be binary dumps of messages.
933 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
935 2003-01-26 Havoc Pennington <hp@pobox.com>
937 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
939 * dbus/dbus-errors.c (dbus_result_to_string): add
942 * dbus/dbus-message-builder.c: new file, will contain code to load
943 up messages from files. Not implemented yet.
945 2003-01-26 Havoc Pennington <hp@pobox.com>
947 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
948 the sender by setting to NULL
950 2003-01-26 Havoc Pennington <hp@pobox.com>
952 The unit tests pass, but otherwise untested. If it breaks, the
953 tests should have been better. ;-)
955 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
958 * dbus/dbus-message.c: redo everything so we maintain
959 message->header as the only copy of the various fields.
960 This avoids the possibility of out-of-memory in some cases,
961 for example dbus_message_lock() can't run out of memory anymore,
962 and avoids extra copying. Figured I may as well go ahead and do
963 this since it was busted for dbus_message_lock to not return
964 failure on OOM, and dbus_message_write_header was totally
965 unchecked for OOM. Also fixed some random other bugs.
967 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
968 that strings are nul-terminated. Also, end_pos can be equal
969 to string length just not greater than, I think.
970 (_dbus_marshal_set_int32): new function
971 (_dbus_marshal_set_uint32): new function
972 (_dbus_marshal_set_string): new function
974 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
975 a warning, init timeout_list to NULL
976 (dbus_connection_send_message): don't use uninitialized variable
979 * dbus/dbus-string.c (_dbus_string_replace_len): new function
981 2003-01-26 Anders Carlsson <andersca@codefactory.se>
983 * bus/driver.c: (bus_driver_handle_hello),
984 (bus_driver_send_welcome_message):
987 2003-01-26 Anders Carlsson <andersca@codefactory.se>
989 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
990 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
991 (dbus_connection_unref):
992 * dbus/dbus-marshal.c: (_dbus_marshal_test):
993 * dbus/dbus-message.c: (dbus_message_unref),
996 (dbus_message_get_fields):
997 Remove debugging printout.
999 (_dbus_message_loader_return_buffer):
1000 Don't store the header string.
1002 (_dbus_message_test):
1005 2003-01-26 Richard Hult <rhult@codefactory.se>
1007 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
1008 the file descriptor list, since it can change under us.
1010 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1012 * glib/dbus-gmain.c: (dbus_connection_prepare),
1013 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1014 (remove_watch), (dbus_connection_hookup_with_g_main):
1015 Rewrite the glib handling to use its own GSource instead of a
1016 GIOChannel so we can catch messages put in the queue while waiting
1019 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1022 * bus/connection.c: (connection_disconnect_handler),
1023 (connection_watch_callback), (bus_connection_setup):
1024 * bus/dispatch.c: (send_one_message),
1025 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1026 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1028 * bus/driver.c: (bus_driver_send_service_deleted),
1029 (bus_driver_send_service_created), (bus_driver_handle_hello),
1030 (bus_driver_send_welcome_message),
1031 (bus_driver_handle_list_services), (bus_driver_remove_connection),
1032 (bus_driver_handle_message):
1034 Refactor code, put the message dispatching in its own file. Use
1035 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
1038 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1040 * dbus/dbus-internals.h:
1041 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
1043 * dbus/dbus-message.c: (dbus_message_get_sender):
1044 * dbus/dbus-message.h:
1045 Implement dbus_message_get_sender.
1047 * dbus/dbus-protocol.h:
1048 Add message and service defines.
1050 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1052 * dbus/dbus-connection.c: (dbus_connection_send_message):
1053 * dbus/dbus-message-internal.h:
1054 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
1055 (dbus_message_write_header):
1056 Remove _dbus_messag_unlock and don't set the client serial on a
1057 message if one already exists.
1059 2003-01-24 Havoc Pennington <hp@pobox.com>
1061 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
1064 * bus/driver.c (bus_driver_handle_list_services): fix a leak
1067 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1069 * dbus/dbus-list.c: (alloc_link), (free_link):
1070 Use a memory pool for the links.
1072 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1074 * bus/connection.c: (bus_connection_foreach):
1076 Add new bus_connection_foreach function.
1078 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
1079 Add function that broadcasts a message to all clients.
1081 (bus_driver_send_service_created), (bus_driver_handle_hello),
1082 (bus_driver_send_welcome_message),
1083 (bus_driver_handle_list_services), (bus_driver_message_handler):
1084 Implement functions that take care of listing services, and notifying
1085 clients when new services are created.
1087 * bus/services.c: (bus_services_list):
1089 Add new function that returns an array of strings with the currently
1090 registered services.
1093 * glib/dbus-gmain.c:
1094 Update copyright year.
1096 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1098 * dbus/dbus-connection.c: (dbus_connection_send_message):
1099 Unlock the message in case it was sent earlier.
1101 (dbus_connection_send_message_with_reply_and_block):
1102 Remove the reply message from the list.
1104 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1105 Set array_len and new_pos correctly.
1107 (_dbus_marshal_test):
1108 Remove debug output.
1110 * dbus/dbus-message-internal.h:
1111 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1112 New function that returns the reply serial.
1114 (_dbus_message_unlock):
1115 New function that unlocks a message and resets its header.
1117 (dbus_message_append_string_array),
1118 (dbus_message_get_fields_valist),
1119 (dbus_message_iter_get_field_type),
1120 (dbus_message_iter_get_string_array),
1121 (dbus_message_get_fields),
1122 (dbus_message_append_fields_valist):
1123 Handle string arrays.
1125 (dbus_message_set_sender):
1126 Make this function public since the bus daemon needs it.
1128 (decode_header_data):
1129 Set the reply serial to -1 initially.
1131 * dbus/dbus-message.h:
1132 Add dbus_message_set_sender.
1134 2003-01-24 Havoc Pennington <hp@pobox.com>
1136 * doc/dbus-specification.sgml: add some stuff
1138 2003-01-22 Havoc Pennington <hp@pobox.com>
1140 * doc/dbus-specification.sgml: Start to document the protocol.
1142 2003-01-22 Havoc Pennington <hp@pobox.com>
1144 * dbus/dbus-connection.c
1145 (dbus_connection_send_message_with_reply_and_block): add some @todo
1147 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1149 2003-01-21 Havoc Pennington <hp@pobox.com>
1151 (patch untested because can't compile)
1153 * bus/driver.c (create_unique_client_name): make this function
1154 never recycle client names. Also, caller should initialize
1157 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1159 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1161 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1162 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1163 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1164 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1165 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1166 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1167 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1168 * dbus/dbus-marshal.h:
1169 * dbus/dbus-protocol.h:
1170 Add support for marshalling and demarshalling integer, double
1173 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1178 * bus/connection.c: (connection_disconnect_handler):
1179 Remove the connection from the bus driver's list.
1181 (connection_watch_callback): Dispatch messages.
1183 (free_connection_data): Free connection name.
1185 (bus_connection_setup): Add connection to the bus driver's list.
1186 (bus_connection_remove_owned_service):
1187 (bus_connection_set_name), (bus_connection_get_name):
1188 Add functions for setting and getting the connection's name.
1191 Add function headers.
1193 * bus/driver.c: (create_unique_client_name),
1194 (bus_driver_handle_hello_message),
1195 (bus_driver_send_welcome_message), (bus_driver_message_handler),
1196 (bus_driver_add_connection), (bus_driver_remove_connection):
1199 * bus/services.c: (bus_service_free):
1201 New file that handles communication and registreation with the bus
1204 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1206 * dbus/dbus-connection.c: (dbus_connection_send_message):
1207 Add a new client_serial parameter.
1209 (dbus_connection_send_message_with_reply):
1210 Remove a @todo since we've implemented the blocking function.
1212 (dbus_connection_send_message_with_reply_and_block):
1213 New function that sends a message and waits for a reply and
1214 then returns the reply.
1216 * dbus/dbus-connection.h:
1219 * dbus/dbus-errors.c: (dbus_result_to_string):
1220 * dbus/dbus-errors.h:
1221 Add new DBUS_RESULT.
1223 * dbus/dbus-message-internal.h:
1224 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1225 (_dbus_message_set_sender), (dbus_message_write_header),
1226 (dbus_message_new_reply), (decode_header_data),
1227 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1228 * dbus/dbus-message.h:
1229 Add new functions that set the reply serial and sender.
1230 Also marshal and demarshal them correctly and add test.
1232 * dbus/dbus-protocol.h:
1233 Add new DBUS_MESSAGE_TYPE_SENDER.
1236 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1237 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1238 (dbus_connection_hookup_with_g_main):
1239 * glib/test-dbus-glib.c: (main):
1240 Rewrite to use GIOChannel and remove the GSource crack.
1242 * test/echo-client.c: (main):
1243 * test/watch.c: (check_messages):
1244 Update for changed APIs
1246 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1248 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1250 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1251 Create a DBusTimeoutList.
1252 (dbus_connection_set_timeout_functions): Add new function to
1253 set timeout callbacks
1255 * dbus/dbus-connection.h: Add public DBusTimeout API.
1257 * dbus/dbus-message.c: (dbus_message_get_service):
1258 * dbus/dbus-message.h: New function.
1260 * dbus/dbus-server.c: Fix small doc typo.
1262 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1264 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1266 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1267 of the string, just as long as specified.
1269 2003-01-19 Havoc Pennington <hp@pobox.com>
1271 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1274 * dbus/dbus-server.c (dbus_server_set_max_connections)
1275 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1276 keep track of current number of connections, and add API for
1277 setting a max (but haven't implemented enforcing the max yet)
1279 2003-01-18 Havoc Pennington <hp@pobox.com>
1281 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1282 reading/writing if read_watch != NULL or write_watch != NULL.
1284 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1285 the message loader code to actually load message->header and
1286 message->body into the newly-created message.
1288 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1291 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1292 (dbus_connection_get_max_message_size)
1293 (dbus_connection_set_max_live_messages_size)
1294 (dbus_connection_get_max_live_messages_size): implement some
1295 resource limitation functions
1297 * dbus/dbus-resources.c: new file implementing some of the
1298 resource limits stuff
1300 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1301 missing docs, add @todo to handle OOM etc.
1303 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1306 2003-01-18 Havoc Pennington <hp@pobox.com>
1308 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1309 connection if it hasn't been already.
1311 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1312 replace with DisconnectFunction.
1314 2003-01-18 Havoc Pennington <hp@pobox.com>
1316 Building --disable-verbose-mode --disable-asserts --disable-tests
1317 cuts the library from 112K to 45K or so
1319 * configure.in: check for varargs macro support,
1320 add --enable-verbose-mode, --enable-asserts.
1322 * dbus/dbus-internals.h (_dbus_assert): support
1324 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1326 2003-01-18 Havoc Pennington <hp@pobox.com>
1328 * dbus/dbus-test.c: include config.h so that tests actually run
1330 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1331 so the failure mode when that assumption fails will be plenty
1334 2003-01-18 Havoc Pennington <hp@pobox.com>
1336 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1338 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1341 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1342 since we don't want to use those in make check
1344 2003-01-15 Havoc Pennington <hp@redhat.com>
1350 2003-01-15 Havoc Pennington <hp@redhat.com>
1352 * test/Makefile.am: fix so that test source code ends up in the
1353 distribution on make distcheck
1355 2003-01-15 Havoc Pennington <hp@redhat.com>
1361 2003-01-15 Havoc Pennington <hp@redhat.com>
1363 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1364 fix build when --disable-tests
1366 * Makefile.am (EXTRA_DIST): put HACKING in here
1368 * HACKING: document procedure for making a tarball release.
1370 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1372 * bus/connection.c: (connection_error_handler),
1373 (bus_connection_setup):
1374 * bus/main.c: (main):
1375 Make sure that the DBusConnectionData struct is NULLed
1376 out to prevent a segfault.
1378 * dbus/dbus-errors.c: (dbus_result_to_string):
1379 * dbus/dbus-errors.h:
1380 * dbus/dbus-message.c: (dbus_message_get_fields),
1381 (dbus_message_get_fields_valist), (_dbus_message_test):
1382 * dbus/dbus-message.h:
1383 Make dbus_message_get_fields return a result code so we can
1384 track invalid fields as well as oom.
1386 2003-01-11 Havoc Pennington <hp@pobox.com>
1388 * configure.in: change --enable-test/--enable-ansi action-if-given
1389 to enable_foo=$enableval instead of enable_foo=yes
1391 2003-01-08 Havoc Pennington <hp@pobox.com>
1393 * dbus/dbus-string.c (_dbus_string_align_length): new function
1395 * dbus/dbus-test-main.c: move main() for test app here
1397 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1398 symbol to run tests, because dbus-test isn't in the main
1401 Code review nitpicks.
1403 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1404 for people with narrow emacs ;-). Assert client_serial was filled
1405 in. Assert message->name != NULL.
1406 (dbus_message_append_fields): have "first_field_type" arg separate
1407 from va list, needed for C++ binding that also uses varargs IIRC
1408 and helps with type safety
1409 (dbus_message_new): add @todo about using DBusString to store
1410 service/name internally
1411 (dbus_message_new): don't leak ->service and ->name on OOM later
1413 (dbus_message_unref): free the service name
1414 (dbus_message_get_fields): same change to varargs
1415 i.e. first_field_type
1416 (_dbus_message_loader_return_buffer): assert that the message data
1417 is aligned (if not it's a bug in our code). Put in verbose griping
1418 about why we set corrupted = TRUE.
1419 (decode_header_data): add FIXME that char* is evil. Was going to
1420 add FIXME about evil locale-specific string.h strncmp, but just
1421 switched to wacky string-as-uint32 optimization. Move check for
1422 "no room for field name" above get_const_data_len() to avoid
1423 assertion failure in get_const_data_len if we have trailing 2
1424 bytes or the like. Check for service and name fields being
1425 provided twice. Don't leak service/name on error. Require field
1426 names to be aligned to 4 bytes.
1428 * dbus/dbus-marshal.c: move byte swap stuff to header
1429 (_dbus_pack_int32): uscore-prefix
1430 (_dbus_unpack_int32): uscore-prefix
1431 (_dbus_unpack_uint32): export
1432 (_dbus_demarshal_string): add @todo complaining about use of
1434 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1435 handling allowing corrupt data to go unchecked
1437 2003-01-08 Havoc Pennington <hp@redhat.com>
1439 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1440 to the select() as needed for authentication. (should be using
1441 _dbus_poll() not select, but for another day)
1443 * dbus/dbus.h: include dbus/dbus-protocol.h
1445 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1447 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1450 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1452 * dbus/dbus-internals.c: (_dbus_type_to_string):
1453 New function that returns a string describing a type.
1455 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1456 * dbus/dbus-marshal.h:
1457 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1458 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1459 (dbus_message_iter_get_byte_array):
1460 * dbus/dbus-message.h:
1461 Add new convenience functions for appending and getting message fields.
1462 Also add demarshalling routines for byte arrays.
1464 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1466 * dbus/dbus-connection-internal.h:
1467 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1468 (_dbus_connection_get_next_client_serial),
1469 (dbus_connection_send_message):
1470 * dbus/dbus-internals.h:
1471 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1472 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1473 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1474 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1475 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1476 (_dbus_verbose_bytes), (_dbus_marshal_test):
1477 * dbus/dbus-marshal.h:
1478 * dbus/dbus-message-internal.h:
1479 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1480 (dbus_message_write_header), (_dbus_message_lock),
1481 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1482 (dbus_message_get_name), (dbus_message_append_int32),
1483 (dbus_message_append_uint32), (dbus_message_append_double),
1484 (dbus_message_append_string), (dbus_message_append_byte_array),
1485 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1486 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1487 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1488 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1489 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1490 (decode_header_data), (_dbus_message_loader_return_buffer),
1491 (message_iter_test), (_dbus_message_test):
1492 * dbus/dbus-message.h:
1493 * dbus/dbus-protocol.h:
1494 * dbus/dbus-test.c: (main):
1496 * glib/test-dbus-glib.c: (message_handler), (main):
1497 * test/echo-client.c: (main):
1498 * test/watch.c: (check_messages):
1499 Make messages sendable and receivable for real.
1501 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1503 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1504 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1505 * dbus/dbus-message.c: (dbus_message_append_int32),
1506 (dbus_message_append_uint32), (dbus_message_append_double),
1507 (dbus_message_append_string), (dbus_message_append_byte_array):
1508 Handle OOM restoration.
1510 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1512 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1513 (_dbus_demarshal_string), (_dbus_marshal_test):
1514 * dbus/dbus-marshal.h:
1515 * dbus/dbus-message.c: (dbus_message_get_name),
1516 Document these functions.
1518 (dbus_message_append_int32), (dbus_message_append_uint32),
1519 (dbus_message_append_double), (dbus_message_append_string),
1520 (dbus_message_append_byte_array):
1521 * dbus/dbus-message.h:
1522 Add functions for adding message fields of different types.
1524 * dbus/dbus-protocol.h:
1525 Add the different types.
1527 2003-01-05 Havoc Pennington <hp@pobox.com>
1529 * bus/connection.c: implement routines for handling connections,
1530 first thing is keeping a list of owned services on each connection
1531 and setting up watches etc.
1533 * bus/services.c: implement a mapping from service names to lists
1536 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1538 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1539 to use static mutexes for global data
1541 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1542 collection of functions to set/get application-specific data
1543 on the DBusConnection.
1545 2003-01-04 Havoc Pennington <hp@pobox.com>
1547 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1548 (_dbus_poll): new function
1550 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1553 * bus/loop.c: initial code for the daemon main loop
1555 2003-01-04 Havoc Pennington <hp@pobox.com>
1557 * test/watch.c (error_handler): make it safe if the error handler
1558 is called multiple times (if we s/error handler/disconnect
1559 handler/ we should just guarantee it's called only once)
1561 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1562 error handler on disconnect (it's quite possible we should
1563 just change the error handler to a "disconnect handler," I'm
1564 not sure we have any other meaningful errors)
1566 * configure.in: check for getpwnam_r
1568 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1569 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1570 mechanism as in SASL spec, using socket credentials
1572 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1573 (_dbus_send_credentials_unix_socket): new function
1575 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1577 (_dbus_write): only check errno if <0 returned
1578 (_dbus_write_two): ditto
1580 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1582 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1583 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1584 (_dbus_marshal_test):
1585 * dbus/dbus-marshal.h:
1586 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1587 to _dbus_marshal_utf8_string. Also fix some tests.
1589 2002-12-28 Harri Porten <porten@kde.org>
1591 * configure.in: added check for C++ compiler and a very cheesy
1592 check for the Qt integration
1594 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1596 * qt/Makefile.am: added
1598 * qt/.cvsignore: added
1600 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1601 latter, added #ifdef QT_THREAD_SUPPORT guard.
1603 * dbus/Makefile.am: added missing headers for make dist
1605 2002-12-28 Kristian Rietveld <kris@gtk.org>
1607 * dbus/Makefile.am: fixup export-symbols-regex.
1609 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1611 * acinclude.m4: Add this file and put the
1612 PKG_CHECK_MODULE macro in it.
1614 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1616 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1617 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1618 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1619 (_dbus_marshal_test):
1620 Make the demarshalling routines align the pos argument.
1621 Add string marshalling tests and fix the obvious bugs
1624 2002-12-26 Havoc Pennington <hp@pobox.com>
1626 * dbus/dbus-auth.c: fixes fixes fixes
1628 * dbus/dbus-transport-unix.c: wire up support for
1629 encoding/decoding data on the wire
1631 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1632 (_dbus_auth_decode_data): append to target string
1633 instead of nuking it.
1635 2002-12-26 Havoc Pennington <hp@pobox.com>
1637 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1638 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1641 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1642 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1643 now). Main point is because I wanted unpack_uint32 to implement
1645 (_dbus_verbose_bytes): new function
1647 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1649 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1650 mechanism to handle a corrupt message stream
1651 (_dbus_message_loader_new): fix preallocation to only prealloc,
1654 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1655 (_dbus_string_test): enhance tests for copy/move and fix the
1658 * dbus/dbus-transport-unix.c: Hold references in more places to
1659 avoid reentrancy problems
1661 * dbus/dbus-transport.c: ditto
1663 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1664 leak reference count in no-message case
1666 * test/watch.c (do_mainloop): handle adding/removing watches
1667 during iteration over the watches. Also, ref the connection/server
1668 stored on a watch, so we don't try to mangle a destroyed one.
1670 * dbus/dbus-transport-unix.c (do_authentication): perform
1673 * dbus/dbus-auth.c (get_state): add a state
1674 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1675 (_dbus_auth_get_unused_bytes): append the unused bytes
1676 to the passed in string, rather than prepend
1678 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1679 the auth conversation DBusAuth
1681 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1682 (_dbus_transport_new_for_domain_socket): when creating a
1683 transport, pass in whether it's a client-side or server-side
1684 transport so we know which DBusAuth to create
1686 2002-12-03 Havoc Pennington <hp@pobox.com>
1688 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1689 _after_ finalizing the derived members
1690 (unix_connection_set): unref watch if we fail to add it
1692 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1693 transport first, so that the connection owned by the
1694 transport will be valid as the transport finalizes.
1696 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1697 if necessary, and remove watches from the connection.
1699 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1701 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1703 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1704 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1705 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1706 (_dbus_marshal_test):
1707 * dbus/dbus-marshal.h:
1708 Add string marshal functions and have the demarshal functions
1709 return the new position.
1711 2002-12-25 Havoc Pennington <hp@pobox.com>
1713 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1714 it is a simple protocol that just maps directly to SASL.
1716 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1717 initial implementation, not actually used yet.
1719 * dbus/dbus-string.c (_dbus_string_find): new function
1720 (_dbus_string_equal): new function
1721 (_dbus_string_base64_encode): new function
1722 (_dbus_string_base64_decode): new function
1724 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1727 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1728 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1729 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1730 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1731 * dbus/dbus-marshal.h:
1732 * dbus/dbus-protocol.h:
1733 * dbus/dbus-test.c: (main):
1735 Add un-optimized marshalling/demarshalling routines.
1737 2002-12-25 Harri Porten <porten@kde.org>
1739 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1741 2002-12-24 Zack Rusin <zack@kde.org>
1743 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1744 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1747 2002-12-24 Havoc Pennington <hp@pobox.com>
1749 * glib/dbus-gthread.c: fix include
1751 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1752 I think glib API needs to change, though, as you don't
1753 want to use DBusMessageFunction, you want to use the
1754 DBusMessageHandler object. Probably
1755 dbus_connection_open_with_g_main_loop()
1756 and dbus_connection_setup_g_main_loop() or something like that
1757 (but think of better names...) that just create a connection
1758 that has watch/timeout functions etc. already set up.
1760 * dbus/dbus-connection.c
1761 (dbus_connection_send_message_with_reply): new function just to
1762 show how the message handler helps us deal with replies.
1764 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1766 * dbus/dbus-string.c (_dbus_string_test): free a string that
1769 * dbus/dbus-hash.c: use memory pools for the hash entries
1770 (rebuild_table): be more paranoid about overflow, and
1771 shrink table when we can
1772 (_dbus_hash_test): reduce number of sprintfs and write
1773 valid C89. Add tests for case where we grow and then
1774 shrink the hash table.
1776 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1778 * dbus/dbus-connection.c (dbus_connection_register_handler)
1779 (dbus_connection_unregister_handler): new functions
1781 * dbus/dbus-message.c (dbus_message_get_name): new
1783 * dbus/dbus-list.c: fix docs typo
1785 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1786 an object representing a handler for messages.
1788 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1791 * glib/dbus-gthread.c: (dbus_gthread_init):
1792 Don't use the gdbus prefix for public functions.
1794 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1798 Add GLib checks and fixup .pc files
1802 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1803 (gdbus_connection_check), (gdbus_connection_dispatch),
1804 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1805 (dbus_connection_gsource_new):
1806 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1807 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1808 * glib/test-dbus-glib.c: (message_handler), (main):
1811 2002-12-15 Harri Porten <porten@kde.org>
1813 * autogen.sh: check for libtoolize before attempting to use it
1815 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1818 * .cvsignore: ignore more stamp files
1820 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1822 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1823 without make install.
1825 2002-12-15 Havoc Pennington <hp@pobox.com>
1827 * dbus/dbus-threads.c: add thread stubs that a higher library
1828 layer can fill in. e.g. the GLib wrapper might fill them in with
1829 GThread stuff. We still need to use this thread API to
1830 thread-safe-ize the library.
1832 2002-12-12 Havoc Pennington <hp@pobox.com>
1834 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1835 below new interfaces and include fewer system headers.
1837 * dbus/dbus-sysdeps.c (_dbus_read): new function
1838 (_dbus_write): new function
1839 (_dbus_write_two): new function
1840 (_dbus_connect_unix_socket): new function
1841 (_dbus_listen_unix_socket): new function
1843 * dbus/dbus-message-internal.h: change interfaces to use
1846 2002-12-11 Havoc Pennington <hp@pobox.com>
1848 * dbus/dbus-types.h: add dbus_unichar
1850 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1852 * dbus/dbus-connection.c (dbus_connection_send_message): return
1855 * dbus/dbus-transport.c: include dbus-watch.h
1857 * dbus/dbus-connection.c: include dbus-message-internal.h
1859 * HACKING: add file with coding guidelines stuff.
1861 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1862 handling here, for security purposes (as in vsftpd). Not actually
1863 using this class yet.
1865 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1866 system/libc usage here, as in vsftpd, for ease of auditing (and
1867 should also simplify portability). Haven't actually moved all the
1868 system/libc usage into here yet.
1870 2002-11-25 Havoc Pennington <hp@pobox.com>
1872 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1873 always print the first verbose message.
1875 2002-11-24 Havoc Pennington <hp@pobox.com>
1877 * test/echo-client.c, test/echo-server.c: cheesy test
1880 * configure.in (AC_CHECK_FUNCS): check for writev
1882 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1885 * dbus/dbus-list.c (_dbus_list_foreach): new function
1887 * dbus/dbus-internals.c (_dbus_verbose): new function
1889 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1890 representing a server that listens for connections.
1892 * dbus/.cvsignore: create
1894 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1895 public API for reporting errors
1897 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1898 public object representing a connection that
1899 sends/receives messages. (Same object used for
1900 both client and server.)
1902 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1903 Basic abstraction for different kinds of stream
1904 that we might read/write messages from.
1906 2002-11-23 Havoc Pennington <hp@pobox.com>
1908 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1911 * dbus/dbus-test.c (main): add list test, and include
1912 dbus-test.h as intended
1914 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1915 (_dbus_hash_table_remove_int): return value indicates
1916 whether the entry existed to remove
1918 * dbus/dbus-list.c: add linked list utility class,
1921 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1924 2002-11-23 Havoc Pennington <hp@pobox.com>
1926 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1927 DBUS_END_DECLS to nothing, that should fix this once and for all
1929 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1931 * dbus/dbus-message.c, dbus/dbus-hash.c:
1932 add some missing @brief
1934 2002-11-23 Havoc Pennington <hp@pobox.com>
1936 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1937 to avoid confusing Doxygen
1939 * dbus/dbus-hash.c: @} not }@
1941 * dbus/dbus-message.c (struct DBusMessage): split out
1944 2002-11-23 Havoc Pennington <hp@pobox.com>
1946 * configure.in: pile on more warning flags if using gcc
1948 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1949 to document static functions
1951 * configure.in: add summary to end of configure so it
1952 looks nice and attractive
1954 * dbus/dbus-hash.c: finish implementation and write unit
1957 * configure.in: add --enable-tests to enable unit tests
1959 * dbus/dbus-test.c: test program to run unit tests
1960 for all files in dbus/*, initially runs a test for
1963 * dbus/dbus-internals.h: file to hold some internal utility stuff
1965 2002-11-22 Havoc Pennington <hp@redhat.com>
1967 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1968 "ported" away from Tcl
1970 * dbus/dbus-types.h: header for types such as dbus_bool_t
1972 2002-11-22 Havoc Pennington <hp@redhat.com>
1974 * dbus/dbus.h: fixups for doc warnings
1976 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1978 (QUIET): make it quiet so we can see warnings
1980 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1982 2002-11-22 Havoc Pennington <hp@redhat.com>
1984 * Makefile.am: include "Doxyfile" target in all-local
1986 * configure.in: generate the Doxyfile
1988 * Doxyfile.in: move Doxyfile here, so we can use
1989 configure to generate a Doxyfile with the right
1992 2002-11-22 Havoc Pennington <hp@redhat.com>
1994 * dbus/dbus-message.c: move inline docs into .c file
1996 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1997 so all docs are under doc/
1998 (MAN_EXTENSION): generate man pages. Use extension
1999 ".3dbus" which matches ".3qt" on my system,
2000 I guess this is OK, I don't know really.
2001 (FILE_PATTERNS): look for .c files not .h, makes sense
2004 2002-11-22 Havoc Pennington <hp@pobox.com>
2006 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
2007 because any app can be a server, and any app can be a client,
2008 the bus is a special kind of server.
2010 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
2012 * Doxyfile : adding. Still needs Makefile rules to be generated
2013 automatically (just run "doxygen" in the toplevel dir for now to
2016 * dbus/dbus-message.h : Adding sample docs (javadoc since
2017 resembles gtk-doc a little more)
2019 * dbus/dbus.h : Adding sample docs
2021 2002-11-21 Havoc Pennington <hp@redhat.com>
2023 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
2024 so we can allow ourselves to include files directly,
2025 instead of having to use dbus.h
2027 * dbus/dbus.h: fill in
2029 * dbus/dbus-message.h: sketch out a sample header file.
2030 Include griping if you include it directly instead of
2033 * dbus/dbus-macros.h: new file with macros for extern "C",
2034 TRUE/FALSE, NULL, etc.
2036 * doc/file-boilerplate.c: put include guards in here
2038 2002-11-21 Havoc Pennington <hp@redhat.com>
2040 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
2042 * COPYING: include the GPL as well, and license code
2043 under both AFL and GPL.
2045 2002-11-21 Havoc Pennington <hp@redhat.com>
2047 * acconfig.h: get rid of this
2049 * autogen.sh (run_configure): add --no-configure option
2051 * configure.in: remove AC_ARG_PROGRAM to make
2052 autoconf complain less. add AC_PREREQ.
2053 add AC_DEFINE third arg.
2055 2002-11-21 Anders Carlsson <andersca@codefactory.se>
2058 Fix references so we can distcheck.
2060 2002-11-21 Havoc Pennington <hp@redhat.com>
2062 * Initial module creation