1 2003-02-15 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-message.c (dbus_message_new): fool around with the
6 2003-02-14 Havoc Pennington <hp@pobox.com>
8 * dbus/dbus-mempool.c: fail if the debug functions so indicate
10 * dbus/dbus-memory.c: fail if the debug functions indicate we
13 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
14 (_dbus_decrement_fail_alloc_counter): debug functions to
15 simulate memory allocation failures
17 2003-02-14 Havoc Pennington <hp@pobox.com>
19 * dbus/dbus-errors.h (struct DBusError): add a word of padding
22 2003-02-13 Anders Carlsson <andersca@codefactory.se>
24 * bus/driver.c: (bus_driver_handle_hello):
26 * bus/services.c: (bus_service_lookup):
27 Reorder message sending so we get a more sane order.
29 * test/bus-test.c: (message_handler):
32 2003-02-13 Anders Carlsson <andersca@codefactory.se>
34 * bus/driver.c: (bus_driver_send_service_deleted),
35 (bus_driver_send_service_created), (bus_driver_send_service_lost),
36 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
37 (bus_driver_send_welcome_message),
38 (bus_driver_handle_list_services),
39 (bus_driver_handle_acquire_service),
40 (bus_driver_handle_service_exists):
41 * dbus/dbus-bus.c: (dbus_bus_register_client),
42 (dbus_bus_acquire_service), (dbus_bus_service_exists):
43 * dbus/dbus-errors.c: (dbus_result_to_string):
45 * dbus/dbus-message.c: (dbus_message_append_args),
46 (dbus_message_append_args_valist), (dbus_message_get_args),
47 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
48 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
49 (dbus_message_iter_get_byte_array),
50 (dbus_message_iter_get_string_array), (message_iter_test),
51 (check_message_handling), (_dbus_message_test):
52 * dbus/dbus-message.h:
53 * test/bus-test.c: (main):
54 Change fields to arguments in messages, so that they won't be
55 confused with header fields.
57 * glib/test-dbus-glib.c: (main):
58 Remove append_fields from hello message.
60 2003-02-13 Anders Carlsson <andersca@codefactory.se>
63 * dbus/dbus-message.c:
67 2003-02-13 Anders Carlsson <andersca@codefactory.se>
69 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
71 Implement support for timeouts in dbus-glib.
73 2003-02-13 Anders Carlsson <andersca@codefactory.se>
75 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
76 * dbus/dbus-message.c: (process_test_subdir):
77 * test/break-loader.c: (find_breaks_based_on):
78 Plug some memory leaks.
80 2003-02-13 Richard Hult <rhult@codefactory.se>
82 * bus/main.c: Fix build.
85 * dbus/dbus-errors.c: Fix copyright for Anders.
87 2003-02-13 Anders Carlsson <andersca@codefactory.se>
92 * bus/connection.c: (bus_connection_foreach):
95 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
96 (unescape_string), (new_section), (parse_section_start),
97 (parse_key_value), (report_error), (bus_desktop_file_load),
98 (bus_desktop_file_get_string):
100 Use DBusError for error reporting.
102 * bus/dispatch.c: (send_one_message),
103 (bus_dispatch_message_handler):
104 * bus/driver.c: (bus_driver_send_service_deleted),
105 (bus_driver_send_service_created), (bus_driver_send_service_lost),
106 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
107 (bus_driver_send_welcome_message),
108 (bus_driver_handle_list_services),
109 (bus_driver_handle_acquire_service),
110 (bus_driver_handle_service_exists):
111 * bus/loop.c: (bus_loop_run):
113 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
115 * bus/utils.c: (bus_wait_for_memory):
117 New files with general utility functions.
119 * dbus/dbus-internals.h:
120 Remove _DBUS_HANDLE_OOM.
122 2003-02-13 Anders Carlsson <andersca@codefactory.se>
124 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
125 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
126 * dbus/dbus-errors.h:
127 Add DBusError structure.
129 2003-02-13 Anders Carlsson <andersca@codefactory.se>
131 * test/data/valid-messages/standard-acquire-service.message:
132 * test/data/valid-messages/standard-hello.message:
133 * test/data/valid-messages/standard-list-services.message:
134 * test/data/valid-messages/standard-service-exists.message:
135 Add some standard messages.
137 2003-02-13 Anders Carlsson <andersca@codefactory.se>
139 * bus/driver.c: (bus_driver_send_welcome_message),
140 (bus_driver_handle_list_services),
141 (bus_driver_handle_acquire_service),
142 (bus_driver_handle_service_exists), (bus_driver_handle_message):
143 Update for API changes in libdbus.
145 * dbus/dbus-message.c: (dbus_message_new_reply):
146 * dbus/dbus-message.h:
147 Remove the name argument. The spec states that replies shouldn't
150 2003-02-13 Anders Carlsson <andersca@codefactory.se>
152 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
153 (report_error), (bus_desktop_file_load), (lookup_section),
154 (lookup_line), (bus_desktop_file_get_raw),
155 (bus_desktop_file_get_string):
156 * bus/desktop-file.h:
157 Some fixes, and new functions for getting a key value from a section.
159 2003-02-13 Havoc Pennington <hp@pobox.com>
161 * test/data/auth/fail-after-n-attempts.auth-script: new test
163 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
166 2003-02-13 Havoc Pennington <hp@pobox.com>
168 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
169 dbus_credentials_match were backward
171 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
172 NO_CREDENTIALS and ROOT_CREDENTIALS
174 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
175 into here. Never process more commands after we've reached an
176 end state; store further data as unused bytes.
178 * test/data/auth/*: add more auth tests
180 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
181 command to match exact string and EXPECT_UNUSED to match unused
184 * test/Makefile.am (dist-hook): fix to dist all the test stuff
186 2003-02-12 Havoc Pennington <hp@pobox.com>
188 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
189 \r off of popped lines
191 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
194 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
197 2003-02-12 Havoc Pennington <hp@pobox.com>
199 * dbus/Makefile.am: remove break-loader from the build, since it
202 * configure.in: add --enable-gcov to turn on coverage profiling
203 flags and disable optimization
205 2003-02-10 Havoc Pennington <hp@pobox.com>
207 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
208 initial cut at test framework for DBusAuth from laptop.
209 Doesn't quite work yet but it compiles and I need to get
210 it off the 266mhz laptop. ;-)
212 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
213 fix a memleak in error case
215 2003-02-12 Anders Carlsson <andersca@codefactory.se>
218 * bus/desktop-file.c:
219 * bus/desktop-file.h:
220 Add a desktop file parser.
222 2003-02-11 Zack Rusin <zack@kde.org>
224 * qt/message.[h|cpp]: sample implementation
225 of the KDE wrapper for DBusMessage
227 2003-02-09 Zack Rusin <zack@kde.org>
229 * test/bus-test.c: make_it_compile
230 * doc/dbus-specification.sgml: minimal semantic fix
232 2003-02-06 Anders Carlsson <andersca@codefactory.se>
238 2003-02-06 Anders Carlsson <andersca@codefactory.se>
241 * dbus/dbus-break-loader.c:
243 * test/break-loader.c:
244 Move dbus-break-loader to test/ and rename it to break-loader.
246 2003-02-02 Havoc Pennington <hp@pobox.com>
248 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
249 for code to manage cookies in your home directory
251 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
253 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
254 to authenticate, then disconnect the client.
256 2003-02-03 Alexander Larsson <alexl@redhat.com>
258 * dbus/dbus-message.c (dbus_message_append_fields):
261 2003-02-02 Anders Carlsson <andersca@codefactory.se>
263 * doc/dbus-specification.sgml:
264 Update address format section.
266 2003-02-02 Anders Carlsson <andersca@codefactory.se>
269 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
270 (message_handler), (new_connection_callback), (loop_quit),
274 2003-02-02 Anders Carlsson <andersca@codefactory.se>
276 * bus/driver.c: (bus_driver_handle_service_exists):
277 Simplify the code a bit.
279 * dbus/dbus-bus.c: (dbus_bus_service_exists):
282 2003-02-02 Anders Carlsson <andersca@codefactory.se>
285 Add libdbus-daemon.la and link to it.
287 2003-02-01 James Willcox <jwillcox@gnome.org>
289 * bus/driver.c: (bus_driver_handle_own_service):
290 Actually include the service reply code in the message.
292 2003-02-02 Anders Carlsson <andersca@codefactory.se>
294 * bus/driver.c: (bus_driver_handle_service_exists):
295 Don't unref the incoming message.
297 2003-02-02 Anders Carlsson <andersca@codefactory.se>
299 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
301 2003-02-02 Anders Carlsson <andersca@codefactory.se>
303 * dbus/dbus-server.c: (dbus_server_listen):
304 * dbus/dbus-transport.c: (_dbus_transport_open):
305 ifdef out the calls to the debug transport and server.
307 2003-02-02 Alexander Larsson <alexl@redhat.com>
309 * dbus/dbus-watch.c (dbus_watch_get_flags):
310 Add note in the docs that ERROR or HANGUP won't be returned
311 and are assumed always on.
313 * glib/dbus-gmain.c (add_watch):
314 Always add IO_ERR | IO_HUP
316 * dbus/dbus-message.h:
317 Add semicolon after dbus_message_iter_get_string_array().
318 Makes qt code build again
320 2003-02-01 Anders Carlsson <andersca@codefactory.se>
322 * bus/driver.c: (create_unique_client_name),
323 (bus_driver_handle_hello):
324 Don't take a name, just use a numeric id to identify
328 * dbus/dbus-bus.c: (dbus_bus_register_client),
329 (dbus_bus_acquire_service), (dbus_bus_service_exists):
331 Add new convenience functions for communicating with the bus.
333 * dbus/dbus-message.h:
335 * dbus/dbus-protocol.h:
338 2003-02-01 Alexander Larsson <alexl@redhat.com>
340 * dbus/dbus-message.c (dbus_message_append_fields):
341 Add some more doc comments.
343 2003-02-01 Havoc Pennington <hp@pobox.com>
345 * dbus/dbus-break-loader.c (randomly_modify_length): change
346 a 4-byte value in the message as if it were a length
348 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
349 execute bit on saved files
351 2003-02-01 Havoc Pennington <hp@pobox.com>
353 * dbus/dbus-break-loader.c (main): new program to find messages
354 that break the loader.
356 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
357 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
359 * dbus/dbus-string.c (_dbus_string_set_byte): new
361 2003-01-31 Havoc Pennington <hp@pobox.com>
363 * dbus/dbus-message.c: refactor the test code to be more general,
364 in preparation for writing a "randomly permute test cases to
365 try to break the loader" program.
367 2003-01-31 Havoc Pennington <hp@pobox.com>
369 * doc/dbus-specification.sgml: work on the specification
371 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
372 the protocol version of the message.
374 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
375 no longer specifies that.
376 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
379 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
380 "break" for DBUS_TYPE_NIL, remove @todo
382 2003-01-31 Havoc Pennington <hp@pobox.com>
384 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
385 just set_is_error/get_is_error as this is a commonly-used
386 function, and write docs.
388 2003-01-31 Anders Carlsson <andersca@codefactory.se>
390 * dbus/dbus-address.c: (dbus_address_entry_free):
391 Free key and value lists.
393 * dbus/dbus-internals.c: (_dbus_type_to_string):
394 Add the types we didn't have.
396 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
397 (_dbus_marshal_validate_arg):
400 * dbus/dbus-message.c: (dbus_message_set_sender):
401 Remove todo about being able to set sender to NULL.
403 (dbus_message_set_is_error_reply),
404 (dbus_message_get_is_error_reply):
405 * dbus/dbus-message.h:
408 * dbus/dbus-protocol.h:
409 Add error reply flag.
411 * test/data/valid-messages/opposite-endian.message:
412 Add NIL type to test.
414 2003-01-31 Havoc Pennington <hp@pobox.com>
416 * doc/dbus-specification.sgml: fully specify the header. Add
417 flags and major protocol version, and change header/body len to
420 * dbus/dbus-message-builder.c (append_saved_length): append length
423 * dbus/dbus-message.c (dbus_message_create_header): change header
424 length and body length to unsigned. Add the new fields from the
426 (_dbus_message_loader_return_buffer): unsigned header/body len
428 2003-01-30 Havoc Pennington <hp@pobox.com>
430 * dbus/dbus-auth.c: rework to use only REJECTED, no
433 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
434 use REJECTED, suggested by Mark McLoughlin
436 2003-01-30 Havoc Pennington <hp@pobox.com>
438 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
439 a better way to report errors here. e.g. "unix address lacks
440 path" or something. also "no such file" when the path doesn't
443 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
445 (dbus_parse_address): add @todo about documenting address format,
446 and allowing , and ; to be escaped
448 2003-01-30 Anders Carlsson <andersca@codefactory.se>
451 Add dbus-address.[ch]
453 * dbus/dbus-address.c: (dbus_address_entry_free),
454 (dbus_address_entries_free), (create_entry),
455 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
456 (dbus_parse_address), (_dbus_address_test):
457 * dbus/dbus-address.h:
458 New files for dealing with address parsing.
460 * dbus/dbus-connection.c:
461 Document timeout functions.
463 * dbus/dbus-message.c:
464 Document dbus_message_new_from_message.
466 * dbus/dbus-server-debug.c:
469 * dbus/dbus-server.c: (dbus_server_listen):
470 Parse address and use correct server implementation.
472 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
473 * dbus/dbus-string.h:
474 New function with test.
476 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
480 * dbus/dbus-transport-debug.c:
483 * dbus/dbus-transport.c: (_dbus_transport_open):
484 Parse address and use correct transport implementation.
486 2003-01-30 Havoc Pennington <hp@pobox.com>
488 * dbus/dbus-message.c: use message->byte_order instead of
489 DBUS_COMPILER_BYTE_ORDER throughout.
490 (dbus_message_create_header): pad header to align the
491 start of the body of the message to 8-byte boundary
493 * dbus/dbus-marshal.h: make all the demarshalers take const
494 DBusString arguments.
496 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
497 validate message args here, so we don't have to do slow validation
498 later, and so we catch bad messages as they are incoming. Also add
499 better checks on header_len and body_len. Also fill in
502 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
503 implemented properly)
504 (_dbus_string_validate_nul): new function to check all-nul
506 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
507 get_arg_end_pos and remove all validation
508 (_dbus_marshal_validate_arg): actually do validation here.
510 2003-01-29 Havoc Pennington <hp@pobox.com>
512 * dbus/dbus-message.c (check_message_handling): fix assertion
513 failure on set_client_serial
515 2003-01-28 Havoc Pennington <hp@pobox.com>
517 * dbus/dbus-server-debug.c: Add doc section comments
519 * dbus/dbus-transport-debug.c: add doc section comments
521 2003-01-28 Havoc Pennington <hp@redhat.com>
523 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
524 the reverse order from how I had it
525 (_dbus_string_base64_encode): reverse encoding order. I was
526 basically byteswapping everything during encoding.
528 2003-01-28 Anders Carlsson <andersca@codefactory.se>
530 * dbus/dbus-connection-internal.h:
531 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
532 (_dbus_connection_remove_timeout):
533 Add functions for adding and removing timeouts.
535 * dbus/dbus-message.c: (dbus_message_new_from_message):
536 Add new function that takes a message and creates an exact
537 copy of it, but with the refcount set to 1.
538 (check_message_handling):
541 * dbus/dbus-server-protected.h:
542 * dbus/dbus-server.c: (_dbus_server_init_base),
543 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
544 (dbus_server_set_timeout_functions):
545 (_dbus_server_remove_timeout):
546 New functions so that a server can add and remove timeouts.
548 (dbus_server_listen):
549 Add commented out call to dbus_server_debug_new.
551 * dbus/dbus-timeout.c: (_dbus_timeout_new):
552 Actually set the handler, doh.
554 * dbus/dbus-transport.c: (_dbus_transport_open):
555 Add commented out call to dbus_transport_debug_client_new.
558 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
560 2003-01-28 Havoc Pennington <hp@pobox.com>
562 * dbus/dbus-message.c (check_message_handling): function to check
563 on the loaded message, iterates over it etc.
565 2003-01-28 Havoc Pennington <hp@pobox.com>
567 * test/Makefile.am (dist-hook): fix make distdir
569 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
571 2003-01-27 Havoc Pennington <hp@pobox.com>
573 * dbus/dbus-mempool.c (time_for_size): replace printf with
576 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
577 empty lines; fix the SAVE_LENGTH stuff to be
578 START_LENGTH/END_LENGTH so it actually works; couple other
581 * test/Makefile.am (dist-hook): add dist-hook for .message files
583 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
584 can be constant or locked.
585 (_dbus_string_free): allow freeing a const string as
588 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
590 * dbus/dbus-test-main.c (main): take an argument which is the
591 directory containing test data
593 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
594 argument to this and load all the messages in test/data/
595 checking that they can be loaded or not loaded as appropriate.
597 2003-01-27 Anders Carlsson <andersca@codefactory.se>
599 * bus/dispatch.c: (bus_dispatch_message_handler):
600 Dispatch messages sent to services.
602 * bus/driver.c: (bus_driver_send_service_deleted),
603 (bus_driver_send_service_created), (bus_driver_send_service_lost),
604 (bus_driver_send_service_acquired):
605 Add helper functions for sending service related messages.
607 (bus_driver_send_welcome_message):
608 Send HELLO_REPLY instead of WELCOME.
610 (bus_driver_handle_list_services):
611 Send LIST_SERVICES_REPLY instead of SERVICES.
613 (bus_driver_handle_own_service),
614 (bus_driver_handle_service_exists):
615 New message handlers.
617 (bus_driver_handle_message):
618 Invoke new message handlers.
620 (bus_driver_remove_connection):
621 Don't remove any services here since that's done automatically
622 by bus_service_remove_owner now.
625 New function signatures.
627 * bus/services.c: (bus_service_add_owner):
628 Send ServiceAcquired message if we're the only primary owner.
630 (bus_service_remove_owner):
631 Send ServiceAcquired/ServiceLost messages.
633 (bus_service_set_prohibit_replacement),
634 (bus_service_get_prohibit_replacement):
635 Functions for setting prohibit replacement.
637 (bus_service_has_owner):
638 New function that checks if a connection is in the owner queue of
642 Add new function signatures.
644 * dbus/dbus-list.c: (_dbus_list_test):
645 Add tests for _dbus_list_remove_last and traversing the list backwards.
648 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
649 go any further, so return NULL then.
651 * dbus/dbus-protocol.h:
652 Add new messages, service flags and service replies.
654 2003-01-26 Havoc Pennington <hp@pobox.com>
656 * dbus/dbus-message-builder.c: implement, completely untested.
658 * test/data/*: add data to be used in testing.
659 ".message" files are our simple loadable text format.
660 ".message-raw" will be binary dumps of messages.
662 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
664 2003-01-26 Havoc Pennington <hp@pobox.com>
666 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
668 * dbus/dbus-errors.c (dbus_result_to_string): add
671 * dbus/dbus-message-builder.c: new file, will contain code to load
672 up messages from files. Not implemented yet.
674 2003-01-26 Havoc Pennington <hp@pobox.com>
676 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
677 the sender by setting to NULL
679 2003-01-26 Havoc Pennington <hp@pobox.com>
681 The unit tests pass, but otherwise untested. If it breaks, the
682 tests should have been better. ;-)
684 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
687 * dbus/dbus-message.c: redo everything so we maintain
688 message->header as the only copy of the various fields.
689 This avoids the possibility of out-of-memory in some cases,
690 for example dbus_message_lock() can't run out of memory anymore,
691 and avoids extra copying. Figured I may as well go ahead and do
692 this since it was busted for dbus_message_lock to not return
693 failure on OOM, and dbus_message_write_header was totally
694 unchecked for OOM. Also fixed some random other bugs.
696 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
697 that strings are nul-terminated. Also, end_pos can be equal
698 to string length just not greater than, I think.
699 (_dbus_marshal_set_int32): new function
700 (_dbus_marshal_set_uint32): new function
701 (_dbus_marshal_set_string): new function
703 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
704 a warning, init timeout_list to NULL
705 (dbus_connection_send_message): don't use uninitialized variable
708 * dbus/dbus-string.c (_dbus_string_replace_len): new function
710 2003-01-26 Anders Carlsson <andersca@codefactory.se>
712 * bus/driver.c: (bus_driver_handle_hello),
713 (bus_driver_send_welcome_message):
716 2003-01-26 Anders Carlsson <andersca@codefactory.se>
718 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
719 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
720 (dbus_connection_unref):
721 * dbus/dbus-marshal.c: (_dbus_marshal_test):
722 * dbus/dbus-message.c: (dbus_message_unref),
725 (dbus_message_get_fields):
726 Remove debugging printout.
728 (_dbus_message_loader_return_buffer):
729 Don't store the header string.
731 (_dbus_message_test):
734 2003-01-26 Richard Hult <rhult@codefactory.se>
736 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
737 the file descriptor list, since it can change under us.
739 2003-01-25 Anders Carlsson <andersca@codefactory.se>
741 * glib/dbus-gmain.c: (dbus_connection_prepare),
742 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
743 (remove_watch), (dbus_connection_hookup_with_g_main):
744 Rewrite the glib handling to use its own GSource instead of a
745 GIOChannel so we can catch messages put in the queue while waiting
748 2003-01-25 Anders Carlsson <andersca@codefactory.se>
751 * bus/connection.c: (connection_disconnect_handler),
752 (connection_watch_callback), (bus_connection_setup):
753 * bus/dispatch.c: (send_one_message),
754 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
755 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
757 * bus/driver.c: (bus_driver_send_service_deleted),
758 (bus_driver_send_service_created), (bus_driver_handle_hello),
759 (bus_driver_send_welcome_message),
760 (bus_driver_handle_list_services), (bus_driver_remove_connection),
761 (bus_driver_handle_message):
763 Refactor code, put the message dispatching in its own file. Use
764 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
767 2003-01-25 Anders Carlsson <andersca@codefactory.se>
769 * dbus/dbus-internals.h:
770 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
772 * dbus/dbus-message.c: (dbus_message_get_sender):
773 * dbus/dbus-message.h:
774 Implement dbus_message_get_sender.
776 * dbus/dbus-protocol.h:
777 Add message and service defines.
779 2003-01-25 Anders Carlsson <andersca@codefactory.se>
781 * dbus/dbus-connection.c: (dbus_connection_send_message):
782 * dbus/dbus-message-internal.h:
783 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
784 (dbus_message_write_header):
785 Remove _dbus_messag_unlock and don't set the client serial on a
786 message if one already exists.
788 2003-01-24 Havoc Pennington <hp@pobox.com>
790 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
793 * bus/driver.c (bus_driver_handle_list_services): fix a leak
796 2003-01-25 Anders Carlsson <andersca@codefactory.se>
798 * dbus/dbus-list.c: (alloc_link), (free_link):
799 Use a memory pool for the links.
801 2003-01-25 Anders Carlsson <andersca@codefactory.se>
803 * bus/connection.c: (bus_connection_foreach):
805 Add new bus_connection_foreach function.
807 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
808 Add function that broadcasts a message to all clients.
810 (bus_driver_send_service_created), (bus_driver_handle_hello),
811 (bus_driver_send_welcome_message),
812 (bus_driver_handle_list_services), (bus_driver_message_handler):
813 Implement functions that take care of listing services, and notifying
814 clients when new services are created.
816 * bus/services.c: (bus_services_list):
818 Add new function that returns an array of strings with the currently
823 Update copyright year.
825 2003-01-25 Anders Carlsson <andersca@codefactory.se>
827 * dbus/dbus-connection.c: (dbus_connection_send_message):
828 Unlock the message in case it was sent earlier.
830 (dbus_connection_send_message_with_reply_and_block):
831 Remove the reply message from the list.
833 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
834 Set array_len and new_pos correctly.
836 (_dbus_marshal_test):
839 * dbus/dbus-message-internal.h:
840 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
841 New function that returns the reply serial.
843 (_dbus_message_unlock):
844 New function that unlocks a message and resets its header.
846 (dbus_message_append_string_array),
847 (dbus_message_get_fields_valist),
848 (dbus_message_iter_get_field_type),
849 (dbus_message_iter_get_string_array),
850 (dbus_message_get_fields),
851 (dbus_message_append_fields_valist):
852 Handle string arrays.
854 (dbus_message_set_sender):
855 Make this function public since the bus daemon needs it.
857 (decode_header_data):
858 Set the reply serial to -1 initially.
860 * dbus/dbus-message.h:
861 Add dbus_message_set_sender.
863 2003-01-24 Havoc Pennington <hp@pobox.com>
865 * doc/dbus-specification.sgml: add some stuff
867 2003-01-22 Havoc Pennington <hp@pobox.com>
869 * doc/dbus-specification.sgml: Start to document the protocol.
871 2003-01-22 Havoc Pennington <hp@pobox.com>
873 * dbus/dbus-connection.c
874 (dbus_connection_send_message_with_reply_and_block): add some @todo
876 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
878 2003-01-21 Havoc Pennington <hp@pobox.com>
880 (patch untested because can't compile)
882 * bus/driver.c (create_unique_client_name): make this function
883 never recycle client names. Also, caller should initialize
886 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
888 2003-01-21 Anders Carlsson <andersca@codefactory.se>
890 * dbus/dbus-marshal.c: (_dbus_marshal_double),
891 (_dbus_marshal_int32), (_dbus_marshal_uint32),
892 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
893 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
894 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
895 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
896 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
897 * dbus/dbus-marshal.h:
898 * dbus/dbus-protocol.h:
899 Add support for marshalling and demarshalling integer, double
902 2003-01-21 Anders Carlsson <andersca@codefactory.se>
907 * bus/connection.c: (connection_disconnect_handler):
908 Remove the connection from the bus driver's list.
910 (connection_watch_callback): Dispatch messages.
912 (free_connection_data): Free connection name.
914 (bus_connection_setup): Add connection to the bus driver's list.
915 (bus_connection_remove_owned_service):
916 (bus_connection_set_name), (bus_connection_get_name):
917 Add functions for setting and getting the connection's name.
920 Add function headers.
922 * bus/driver.c: (create_unique_client_name),
923 (bus_driver_handle_hello_message),
924 (bus_driver_send_welcome_message), (bus_driver_message_handler),
925 (bus_driver_add_connection), (bus_driver_remove_connection):
928 * bus/services.c: (bus_service_free):
930 New file that handles communication and registreation with the bus
933 2003-01-21 Anders Carlsson <andersca@codefactory.se>
935 * dbus/dbus-connection.c: (dbus_connection_send_message):
936 Add a new client_serial parameter.
938 (dbus_connection_send_message_with_reply):
939 Remove a @todo since we've implemented the blocking function.
941 (dbus_connection_send_message_with_reply_and_block):
942 New function that sends a message and waits for a reply and
943 then returns the reply.
945 * dbus/dbus-connection.h:
948 * dbus/dbus-errors.c: (dbus_result_to_string):
949 * dbus/dbus-errors.h:
952 * dbus/dbus-message-internal.h:
953 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
954 (_dbus_message_set_sender), (dbus_message_write_header),
955 (dbus_message_new_reply), (decode_header_data),
956 (_dbus_message_loader_return_buffer), (_dbus_message_test):
957 * dbus/dbus-message.h:
958 Add new functions that set the reply serial and sender.
959 Also marshal and demarshal them correctly and add test.
961 * dbus/dbus-protocol.h:
962 Add new DBUS_MESSAGE_TYPE_SENDER.
965 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
966 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
967 (dbus_connection_hookup_with_g_main):
968 * glib/test-dbus-glib.c: (main):
969 Rewrite to use GIOChannel and remove the GSource crack.
971 * test/echo-client.c: (main):
972 * test/watch.c: (check_messages):
973 Update for changed APIs
975 2003-01-19 Anders Carlsson <andersca@codefactory.se>
977 * dbus/Makefile.am: Add dbus-timeout.[cħ]
979 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
980 Create a DBusTimeoutList.
981 (dbus_connection_set_timeout_functions): Add new function to
982 set timeout callbacks
984 * dbus/dbus-connection.h: Add public DBusTimeout API.
986 * dbus/dbus-message.c: (dbus_message_get_service):
987 * dbus/dbus-message.h: New function.
989 * dbus/dbus-server.c: Fix small doc typo.
991 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
993 2003-01-19 Anders Carlsson <andersca@codefactory.se>
995 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
996 of the string, just as long as specified.
998 2003-01-19 Havoc Pennington <hp@pobox.com>
1000 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1003 * dbus/dbus-server.c (dbus_server_set_max_connections)
1004 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1005 keep track of current number of connections, and add API for
1006 setting a max (but haven't implemented enforcing the max yet)
1008 2003-01-18 Havoc Pennington <hp@pobox.com>
1010 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1011 reading/writing if read_watch != NULL or write_watch != NULL.
1013 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1014 the message loader code to actually load message->header and
1015 message->body into the newly-created message.
1017 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1020 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1021 (dbus_connection_get_max_message_size)
1022 (dbus_connection_set_max_live_messages_size)
1023 (dbus_connection_get_max_live_messages_size): implement some
1024 resource limitation functions
1026 * dbus/dbus-resources.c: new file implementing some of the
1027 resource limits stuff
1029 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1030 missing docs, add @todo to handle OOM etc.
1032 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1035 2003-01-18 Havoc Pennington <hp@pobox.com>
1037 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1038 connection if it hasn't been already.
1040 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1041 replace with DisconnectFunction.
1043 2003-01-18 Havoc Pennington <hp@pobox.com>
1045 Building --disable-verbose-mode --disable-asserts --disable-tests
1046 cuts the library from 112K to 45K or so
1048 * configure.in: check for varargs macro support,
1049 add --enable-verbose-mode, --enable-asserts.
1051 * dbus/dbus-internals.h (_dbus_assert): support
1053 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1055 2003-01-18 Havoc Pennington <hp@pobox.com>
1057 * dbus/dbus-test.c: include config.h so that tests actually run
1059 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1060 so the failure mode when that assumption fails will be plenty
1063 2003-01-18 Havoc Pennington <hp@pobox.com>
1065 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1067 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1070 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1071 since we don't want to use those in make check
1073 2003-01-15 Havoc Pennington <hp@redhat.com>
1079 2003-01-15 Havoc Pennington <hp@redhat.com>
1081 * test/Makefile.am: fix so that test source code ends up in the
1082 distribution on make distcheck
1084 2003-01-15 Havoc Pennington <hp@redhat.com>
1090 2003-01-15 Havoc Pennington <hp@redhat.com>
1092 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1093 fix build when --disable-tests
1095 * Makefile.am (EXTRA_DIST): put HACKING in here
1097 * HACKING: document procedure for making a tarball release.
1099 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1101 * bus/connection.c: (connection_error_handler),
1102 (bus_connection_setup):
1103 * bus/main.c: (main):
1104 Make sure that the DBusConnectionData struct is NULLed
1105 out to prevent a segfault.
1107 * dbus/dbus-errors.c: (dbus_result_to_string):
1108 * dbus/dbus-errors.h:
1109 * dbus/dbus-message.c: (dbus_message_get_fields),
1110 (dbus_message_get_fields_valist), (_dbus_message_test):
1111 * dbus/dbus-message.h:
1112 Make dbus_message_get_fields return a result code so we can
1113 track invalid fields as well as oom.
1115 2003-01-11 Havoc Pennington <hp@pobox.com>
1117 * configure.in: change --enable-test/--enable-ansi action-if-given
1118 to enable_foo=$enableval instead of enable_foo=yes
1120 2003-01-08 Havoc Pennington <hp@pobox.com>
1122 * dbus/dbus-string.c (_dbus_string_align_length): new function
1124 * dbus/dbus-test-main.c: move main() for test app here
1126 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1127 symbol to run tests, because dbus-test isn't in the main
1130 Code review nitpicks.
1132 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1133 for people with narrow emacs ;-). Assert client_serial was filled
1134 in. Assert message->name != NULL.
1135 (dbus_message_append_fields): have "first_field_type" arg separate
1136 from va list, needed for C++ binding that also uses varargs IIRC
1137 and helps with type safety
1138 (dbus_message_new): add @todo about using DBusString to store
1139 service/name internally
1140 (dbus_message_new): don't leak ->service and ->name on OOM later
1142 (dbus_message_unref): free the service name
1143 (dbus_message_get_fields): same change to varargs
1144 i.e. first_field_type
1145 (_dbus_message_loader_return_buffer): assert that the message data
1146 is aligned (if not it's a bug in our code). Put in verbose griping
1147 about why we set corrupted = TRUE.
1148 (decode_header_data): add FIXME that char* is evil. Was going to
1149 add FIXME about evil locale-specific string.h strncmp, but just
1150 switched to wacky string-as-uint32 optimization. Move check for
1151 "no room for field name" above get_const_data_len() to avoid
1152 assertion failure in get_const_data_len if we have trailing 2
1153 bytes or the like. Check for service and name fields being
1154 provided twice. Don't leak service/name on error. Require field
1155 names to be aligned to 4 bytes.
1157 * dbus/dbus-marshal.c: move byte swap stuff to header
1158 (_dbus_pack_int32): uscore-prefix
1159 (_dbus_unpack_int32): uscore-prefix
1160 (_dbus_unpack_uint32): export
1161 (_dbus_demarshal_string): add @todo complaining about use of
1163 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1164 handling allowing corrupt data to go unchecked
1166 2003-01-08 Havoc Pennington <hp@redhat.com>
1168 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1169 to the select() as needed for authentication. (should be using
1170 _dbus_poll() not select, but for another day)
1172 * dbus/dbus.h: include dbus/dbus-protocol.h
1174 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1176 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1179 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1181 * dbus/dbus-internals.c: (_dbus_type_to_string):
1182 New function that returns a string describing a type.
1184 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1185 * dbus/dbus-marshal.h:
1186 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1187 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1188 (dbus_message_iter_get_byte_array):
1189 * dbus/dbus-message.h:
1190 Add new convenience functions for appending and getting message fields.
1191 Also add demarshalling routines for byte arrays.
1193 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1195 * dbus/dbus-connection-internal.h:
1196 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1197 (_dbus_connection_get_next_client_serial),
1198 (dbus_connection_send_message):
1199 * dbus/dbus-internals.h:
1200 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1201 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1202 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1203 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1204 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1205 (_dbus_verbose_bytes), (_dbus_marshal_test):
1206 * dbus/dbus-marshal.h:
1207 * dbus/dbus-message-internal.h:
1208 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1209 (dbus_message_write_header), (_dbus_message_lock),
1210 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1211 (dbus_message_get_name), (dbus_message_append_int32),
1212 (dbus_message_append_uint32), (dbus_message_append_double),
1213 (dbus_message_append_string), (dbus_message_append_byte_array),
1214 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1215 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1216 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1217 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1218 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1219 (decode_header_data), (_dbus_message_loader_return_buffer),
1220 (message_iter_test), (_dbus_message_test):
1221 * dbus/dbus-message.h:
1222 * dbus/dbus-protocol.h:
1223 * dbus/dbus-test.c: (main):
1225 * glib/test-dbus-glib.c: (message_handler), (main):
1226 * test/echo-client.c: (main):
1227 * test/watch.c: (check_messages):
1228 Make messages sendable and receivable for real.
1230 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1232 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1233 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1234 * dbus/dbus-message.c: (dbus_message_append_int32),
1235 (dbus_message_append_uint32), (dbus_message_append_double),
1236 (dbus_message_append_string), (dbus_message_append_byte_array):
1237 Handle OOM restoration.
1239 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1241 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1242 (_dbus_demarshal_string), (_dbus_marshal_test):
1243 * dbus/dbus-marshal.h:
1244 * dbus/dbus-message.c: (dbus_message_get_name),
1245 Document these functions.
1247 (dbus_message_append_int32), (dbus_message_append_uint32),
1248 (dbus_message_append_double), (dbus_message_append_string),
1249 (dbus_message_append_byte_array):
1250 * dbus/dbus-message.h:
1251 Add functions for adding message fields of different types.
1253 * dbus/dbus-protocol.h:
1254 Add the different types.
1256 2003-01-05 Havoc Pennington <hp@pobox.com>
1258 * bus/connection.c: implement routines for handling connections,
1259 first thing is keeping a list of owned services on each connection
1260 and setting up watches etc.
1262 * bus/services.c: implement a mapping from service names to lists
1265 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1267 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1268 to use static mutexes for global data
1270 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1271 collection of functions to set/get application-specific data
1272 on the DBusConnection.
1274 2003-01-04 Havoc Pennington <hp@pobox.com>
1276 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1277 (_dbus_poll): new function
1279 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1282 * bus/loop.c: initial code for the daemon main loop
1284 2003-01-04 Havoc Pennington <hp@pobox.com>
1286 * test/watch.c (error_handler): make it safe if the error handler
1287 is called multiple times (if we s/error handler/disconnect
1288 handler/ we should just guarantee it's called only once)
1290 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1291 error handler on disconnect (it's quite possible we should
1292 just change the error handler to a "disconnect handler," I'm
1293 not sure we have any other meaningful errors)
1295 * configure.in: check for getpwnam_r
1297 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1298 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1299 mechanism as in SASL spec, using socket credentials
1301 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1302 (_dbus_send_credentials_unix_socket): new function
1304 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1306 (_dbus_write): only check errno if <0 returned
1307 (_dbus_write_two): ditto
1309 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1311 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1312 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1313 (_dbus_marshal_test):
1314 * dbus/dbus-marshal.h:
1315 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1316 to _dbus_marshal_utf8_string. Also fix some tests.
1318 2002-12-28 Harri Porten <porten@kde.org>
1320 * configure.in: added check for C++ compiler and a very cheesy
1321 check for the Qt integration
1323 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1325 * qt/Makefile.am: added
1327 * qt/.cvsignore: added
1329 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1330 latter, added #ifdef QT_THREAD_SUPPORT guard.
1332 * dbus/Makefile.am: added missing headers for make dist
1334 2002-12-28 Kristian Rietveld <kris@gtk.org>
1336 * dbus/Makefile.am: fixup export-symbols-regex.
1338 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1340 * acinclude.m4: Add this file and put the
1341 PKG_CHECK_MODULE macro in it.
1343 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1345 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1346 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1347 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1348 (_dbus_marshal_test):
1349 Make the demarshalling routines align the pos argument.
1350 Add string marshalling tests and fix the obvious bugs
1353 2002-12-26 Havoc Pennington <hp@pobox.com>
1355 * dbus/dbus-auth.c: fixes fixes fixes
1357 * dbus/dbus-transport-unix.c: wire up support for
1358 encoding/decoding data on the wire
1360 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1361 (_dbus_auth_decode_data): append to target string
1362 instead of nuking it.
1364 2002-12-26 Havoc Pennington <hp@pobox.com>
1366 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1367 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1370 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1371 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1372 now). Main point is because I wanted unpack_uint32 to implement
1374 (_dbus_verbose_bytes): new function
1376 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1378 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1379 mechanism to handle a corrupt message stream
1380 (_dbus_message_loader_new): fix preallocation to only prealloc,
1383 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1384 (_dbus_string_test): enhance tests for copy/move and fix the
1387 * dbus/dbus-transport-unix.c: Hold references in more places to
1388 avoid reentrancy problems
1390 * dbus/dbus-transport.c: ditto
1392 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1393 leak reference count in no-message case
1395 * test/watch.c (do_mainloop): handle adding/removing watches
1396 during iteration over the watches. Also, ref the connection/server
1397 stored on a watch, so we don't try to mangle a destroyed one.
1399 * dbus/dbus-transport-unix.c (do_authentication): perform
1402 * dbus/dbus-auth.c (get_state): add a state
1403 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1404 (_dbus_auth_get_unused_bytes): append the unused bytes
1405 to the passed in string, rather than prepend
1407 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1408 the auth conversation DBusAuth
1410 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1411 (_dbus_transport_new_for_domain_socket): when creating a
1412 transport, pass in whether it's a client-side or server-side
1413 transport so we know which DBusAuth to create
1415 2002-12-03 Havoc Pennington <hp@pobox.com>
1417 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1418 _after_ finalizing the derived members
1419 (unix_connection_set): unref watch if we fail to add it
1421 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1422 transport first, so that the connection owned by the
1423 transport will be valid as the transport finalizes.
1425 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1426 if necessary, and remove watches from the connection.
1428 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1430 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1432 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1433 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1434 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1435 (_dbus_marshal_test):
1436 * dbus/dbus-marshal.h:
1437 Add string marshal functions and have the demarshal functions
1438 return the new position.
1440 2002-12-25 Havoc Pennington <hp@pobox.com>
1442 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1443 it is a simple protocol that just maps directly to SASL.
1445 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1446 initial implementation, not actually used yet.
1448 * dbus/dbus-string.c (_dbus_string_find): new function
1449 (_dbus_string_equal): new function
1450 (_dbus_string_base64_encode): new function
1451 (_dbus_string_base64_decode): new function
1453 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1456 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1457 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1458 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1459 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1460 * dbus/dbus-marshal.h:
1461 * dbus/dbus-protocol.h:
1462 * dbus/dbus-test.c: (main):
1464 Add un-optimized marshalling/demarshalling routines.
1466 2002-12-25 Harri Porten <porten@kde.org>
1468 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1470 2002-12-24 Zack Rusin <zack@kde.org>
1472 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1473 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1476 2002-12-24 Havoc Pennington <hp@pobox.com>
1478 * glib/dbus-gthread.c: fix include
1480 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1481 I think glib API needs to change, though, as you don't
1482 want to use DBusMessageFunction, you want to use the
1483 DBusMessageHandler object. Probably
1484 dbus_connection_open_with_g_main_loop()
1485 and dbus_connection_setup_g_main_loop() or something like that
1486 (but think of better names...) that just create a connection
1487 that has watch/timeout functions etc. already set up.
1489 * dbus/dbus-connection.c
1490 (dbus_connection_send_message_with_reply): new function just to
1491 show how the message handler helps us deal with replies.
1493 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1495 * dbus/dbus-string.c (_dbus_string_test): free a string that
1498 * dbus/dbus-hash.c: use memory pools for the hash entries
1499 (rebuild_table): be more paranoid about overflow, and
1500 shrink table when we can
1501 (_dbus_hash_test): reduce number of sprintfs and write
1502 valid C89. Add tests for case where we grow and then
1503 shrink the hash table.
1505 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1507 * dbus/dbus-connection.c (dbus_connection_register_handler)
1508 (dbus_connection_unregister_handler): new functions
1510 * dbus/dbus-message.c (dbus_message_get_name): new
1512 * dbus/dbus-list.c: fix docs typo
1514 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1515 an object representing a handler for messages.
1517 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1520 * glib/dbus-gthread.c: (dbus_gthread_init):
1521 Don't use the gdbus prefix for public functions.
1523 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1527 Add GLib checks and fixup .pc files
1531 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1532 (gdbus_connection_check), (gdbus_connection_dispatch),
1533 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1534 (dbus_connection_gsource_new):
1535 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1536 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1537 * glib/test-dbus-glib.c: (message_handler), (main):
1540 2002-12-15 Harri Porten <porten@kde.org>
1542 * autogen.sh: check for libtoolize before attempting to use it
1544 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1547 * .cvsignore: ignore more stamp files
1549 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1551 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1552 without make install.
1554 2002-12-15 Havoc Pennington <hp@pobox.com>
1556 * dbus/dbus-threads.c: add thread stubs that a higher library
1557 layer can fill in. e.g. the GLib wrapper might fill them in with
1558 GThread stuff. We still need to use this thread API to
1559 thread-safe-ize the library.
1561 2002-12-12 Havoc Pennington <hp@pobox.com>
1563 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1564 below new interfaces and include fewer system headers.
1566 * dbus/dbus-sysdeps.c (_dbus_read): new function
1567 (_dbus_write): new function
1568 (_dbus_write_two): new function
1569 (_dbus_connect_unix_socket): new function
1570 (_dbus_listen_unix_socket): new function
1572 * dbus/dbus-message-internal.h: change interfaces to use
1575 2002-12-11 Havoc Pennington <hp@pobox.com>
1577 * dbus/dbus-types.h: add dbus_unichar
1579 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1581 * dbus/dbus-connection.c (dbus_connection_send_message): return
1584 * dbus/dbus-transport.c: include dbus-watch.h
1586 * dbus/dbus-connection.c: include dbus-message-internal.h
1588 * HACKING: add file with coding guidelines stuff.
1590 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1591 handling here, for security purposes (as in vsftpd). Not actually
1592 using this class yet.
1594 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1595 system/libc usage here, as in vsftpd, for ease of auditing (and
1596 should also simplify portability). Haven't actually moved all the
1597 system/libc usage into here yet.
1599 2002-11-25 Havoc Pennington <hp@pobox.com>
1601 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1602 always print the first verbose message.
1604 2002-11-24 Havoc Pennington <hp@pobox.com>
1606 * test/echo-client.c, test/echo-server.c: cheesy test
1609 * configure.in (AC_CHECK_FUNCS): check for writev
1611 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1614 * dbus/dbus-list.c (_dbus_list_foreach): new function
1616 * dbus/dbus-internals.c (_dbus_verbose): new function
1618 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1619 representing a server that listens for connections.
1621 * dbus/.cvsignore: create
1623 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1624 public API for reporting errors
1626 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1627 public object representing a connection that
1628 sends/receives messages. (Same object used for
1629 both client and server.)
1631 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1632 Basic abstraction for different kinds of stream
1633 that we might read/write messages from.
1635 2002-11-23 Havoc Pennington <hp@pobox.com>
1637 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1640 * dbus/dbus-test.c (main): add list test, and include
1641 dbus-test.h as intended
1643 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1644 (_dbus_hash_table_remove_int): return value indicates
1645 whether the entry existed to remove
1647 * dbus/dbus-list.c: add linked list utility class,
1650 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1653 2002-11-23 Havoc Pennington <hp@pobox.com>
1655 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1656 DBUS_END_DECLS to nothing, that should fix this once and for all
1658 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1660 * dbus/dbus-message.c, dbus/dbus-hash.c:
1661 add some missing @brief
1663 2002-11-23 Havoc Pennington <hp@pobox.com>
1665 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1666 to avoid confusing Doxygen
1668 * dbus/dbus-hash.c: @} not }@
1670 * dbus/dbus-message.c (struct DBusMessage): split out
1673 2002-11-23 Havoc Pennington <hp@pobox.com>
1675 * configure.in: pile on more warning flags if using gcc
1677 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1678 to document static functions
1680 * configure.in: add summary to end of configure so it
1681 looks nice and attractive
1683 * dbus/dbus-hash.c: finish implementation and write unit
1686 * configure.in: add --enable-tests to enable unit tests
1688 * dbus/dbus-test.c: test program to run unit tests
1689 for all files in dbus/*, initially runs a test for
1692 * dbus/dbus-internals.h: file to hold some internal utility stuff
1694 2002-11-22 Havoc Pennington <hp@redhat.com>
1696 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1697 "ported" away from Tcl
1699 * dbus/dbus-types.h: header for types such as dbus_bool_t
1701 2002-11-22 Havoc Pennington <hp@redhat.com>
1703 * dbus/dbus.h: fixups for doc warnings
1705 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1707 (QUIET): make it quiet so we can see warnings
1709 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1711 2002-11-22 Havoc Pennington <hp@redhat.com>
1713 * Makefile.am: include "Doxyfile" target in all-local
1715 * configure.in: generate the Doxyfile
1717 * Doxyfile.in: move Doxyfile here, so we can use
1718 configure to generate a Doxyfile with the right
1721 2002-11-22 Havoc Pennington <hp@redhat.com>
1723 * dbus/dbus-message.c: move inline docs into .c file
1725 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1726 so all docs are under doc/
1727 (MAN_EXTENSION): generate man pages. Use extension
1728 ".3dbus" which matches ".3qt" on my system,
1729 I guess this is OK, I don't know really.
1730 (FILE_PATTERNS): look for .c files not .h, makes sense
1733 2002-11-22 Havoc Pennington <hp@pobox.com>
1735 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1736 because any app can be a server, and any app can be a client,
1737 the bus is a special kind of server.
1739 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1741 * Doxyfile : adding. Still needs Makefile rules to be generated
1742 automatically (just run "doxygen" in the toplevel dir for now to
1745 * dbus/dbus-message.h : Adding sample docs (javadoc since
1746 resembles gtk-doc a little more)
1748 * dbus/dbus.h : Adding sample docs
1750 2002-11-21 Havoc Pennington <hp@redhat.com>
1752 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1753 so we can allow ourselves to include files directly,
1754 instead of having to use dbus.h
1756 * dbus/dbus.h: fill in
1758 * dbus/dbus-message.h: sketch out a sample header file.
1759 Include griping if you include it directly instead of
1762 * dbus/dbus-macros.h: new file with macros for extern "C",
1763 TRUE/FALSE, NULL, etc.
1765 * doc/file-boilerplate.c: put include guards in here
1767 2002-11-21 Havoc Pennington <hp@redhat.com>
1769 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1771 * COPYING: include the GPL as well, and license code
1772 under both AFL and GPL.
1774 2002-11-21 Havoc Pennington <hp@redhat.com>
1776 * acconfig.h: get rid of this
1778 * autogen.sh (run_configure): add --no-configure option
1780 * configure.in: remove AC_ARG_PROGRAM to make
1781 autoconf complain less. add AC_PREREQ.
1782 add AC_DEFINE third arg.
1784 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1787 Fix references so we can distcheck.
1789 2002-11-21 Havoc Pennington <hp@redhat.com>
1791 * Initial module creation