1 2003-04-03 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4 in preparation for modifying it, dbus-sysdeps is getting
7 2003-04-03 Havoc Pennington <hp@redhat.com>
9 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
12 * bus/*.[hc]: adapt to mainloop change
14 2003-04-03 Havoc Pennington <hp@redhat.com>
16 * bus/activation.c (load_directory): fix up memleaks
17 (bus_activation_entry_free): free the entry
19 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
20 we get one from the message bus; fix memleaks.
22 * dbus/dbus-message.c (dbus_set_error_from_message): new function
24 2003-04-03 Havoc Pennington <hp@pobox.com>
26 * bus/config-parser.c (bus_config_parser_unref): free
27 list of mechanisms, bug discovered by test suite enhancements
28 (putting system.conf and session.conf into suite)
30 * test/Makefile.am, test/test-service.c: add placeholder for a
31 test service that we'll activate as part of test suite. Doesn't
34 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
35 setting NULL value, and use system malloc not dbus_malloc()
36 when we have unavoidable memleakage.
38 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
39 didn't work, and support DBUS_BUS_ACTIVATION.
41 * bus/activation.c (child_setup): pass our well-known bus type to
44 * bus/config-parser.c: support <type> to specify well-known type
46 * doc/dbus-specification.sgml: document the env variables to
47 locate well-known buses and find service activator
49 2003-04-02 Havoc Pennington <hp@redhat.com>
51 * test/Makefile.am (all-local): add a rule to copy tests to
52 builddir, so we can have generated tests. Use this to remove the
53 silly hack for testing system.conf and session.conf. Will use this
54 shortly to generate .service files pointing to test binaries.
56 2003-04-02 Havoc Pennington <hp@redhat.com>
58 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
59 current alloc and needed new length, not max of the doubled
60 allocation and needed new length. Also, when building tests,
61 don't do the double-allocation stuff, just realloc every time.
63 2003-04-02 Havoc Pennington <hp@redhat.com>
65 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
67 (_dbus_string_get_dirname): new
68 (_dbus_sysdeps_test): new
69 (_dbus_directory_open): include dirnames in error messages
71 * bus/config-parser.c: interpret <include> and <includedir> and
72 <servicedir> relative to config file location if the given
73 filename is not absolute.
75 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
77 2003-04-02 Havoc Pennington <hp@redhat.com>
79 * bus/connection.c (bus_transaction_send_error_reply): set sender
80 service for the error, and unref the reply on success
82 * bus/activation.c: convert to use BusTransaction so OOM can be
84 (bus_activation_service_created): set sender of the message
86 2003-04-01 Havoc Pennington <hp@redhat.com>
88 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
89 <includedir> (at least mostly)
91 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
92 first, then the user ID
94 2003-04-01 Havoc Pennington <hp@pobox.com>
96 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
99 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
101 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
103 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
104 socket 0777, and unlink any existing socket.
106 * bus/bus.c (bus_context_new): change our UID/GID and fork if
107 the configuration file so specifies; set up auth mechanism
110 * bus/config-parser.c (bus_config_parser_content): add support
111 for <fork> option and fill in code for <auth>
113 * bus/system.conf.in: add <fork/> to default configuration,
114 and limit auth mechanisms to EXTERNAL
116 * doc/config-file.txt (Elements): add <fork>
118 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
119 (_dbus_change_identity): new function
121 2003-03-31 Havoc Pennington <hp@redhat.com>
123 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
124 (_dbus_listen_unix_socket): fix off-by-one error in null
125 termination spotted by Nalin
127 2003-03-31 Havoc Pennington <hp@redhat.com>
129 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
130 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
131 having a real home directory available.
133 2003-03-31 Havoc Pennington <hp@redhat.com>
135 * bus/Makefile.am (install-data-hook): create /var/run/dbus
137 * bus/messagebus.in: add init script for Red Hat /etc/init.d
139 * configure.in: add support for specifying a style of init script
142 2003-03-31 Havoc Pennington <hp@redhat.com>
144 Fix some annoying DBusString API and fix all affected code.
146 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
148 (_dbus_string_get_data): change to return string instead of using
150 (_dbus_string_get_const_data): ditto
151 (_dbus_string_get_data_len): ditto
152 (_dbus_string_get_const_data_len): ditto
154 2003-03-31 Havoc Pennington <hp@redhat.com>
156 * bus/main.c (main): fix up the command line arguments to be nicer
158 2003-03-31 Havoc Pennington <hp@redhat.com>
160 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
161 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
162 final location that lands in the config file
164 * bus/config-loader-expat.c (bus_config_load): fix type of
167 * doc/TODO: remove TODO item for dbus_bus_get()
169 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
171 2003-03-31 Havoc Pennington <hp@pobox.com>
173 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
174 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
175 argument since they are always client side
177 * dbus/dbus-server.c (dbus_server_get_address): new function
179 * bus/main.c (main): take the configuration file as an argument.
181 * test/data/valid-config-files/debug-allow-all.conf: new file to
182 use with dispatch.c tests for example
184 * bus/test-main.c (main): require test data dir
186 * bus/bus.c (bus_context_new): change this to take a
187 configuration file name as argument
189 * doc/config-file.txt (Elements): add <servicedir>
191 * bus/system.conf, bus/session.conf: new files
193 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
194 well-known socket if none set
196 * configure.in: create system.conf and session.conf
198 2003-03-30 Havoc Pennington <hp@pobox.com>
200 * bus/config-parser.c: hacking
202 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
203 to shut down, since it could cause weirdness with the DBusList
206 * dbus/dbus-list.c (_dbus_list_test): add tests for the
207 link-oriented stack routines
208 (alloc_link): free the mempool if the first alloc from it fails
210 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
212 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
214 (_dbus_string_skip_white): new
216 * doc/config-file.txt (Elements): add <includedir>
218 2003-03-28 Havoc Pennington <hp@pobox.com>
220 * dbus/dbus-string.c (_dbus_string_copy_data_len)
221 (_dbus_string_copy_data): new functions
223 2003-03-28 Anders Carlsson <andersca@codefactory.se>
225 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
229 * dbus/dbus-memory.c:
232 2003-03-28 Havoc Pennington <hp@pobox.com>
234 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
235 I think it may have just been superstition. Not sure.
237 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
238 failures that were not being handled.
240 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
242 * dbus/dbus-memory.c: add ability to set number of mallocs in a
243 row that will fail on out-of-memory.
245 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
246 function for testing out-of-memory handling.
248 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
249 allocation functions, they do map exactly to the expat ones.
251 2003-03-27 Havoc Pennington <hp@redhat.com>
253 * bus/config-loader-libxml.c (bus_config_load): add another error
256 2003-03-26 Anders Carlsson <andersca@codefactory.se>
259 Add note about automatic service activation.
261 * doc/dbus-specification.sgml:
262 Rename the specification and clarify a few things.
264 2003-03-26 Anders Carlsson <andersca@codefactory.se>
267 * dbus/dbus-address.c:
269 * dbus/dbus-marshal.c:
270 * dbus/dbus-server-debug-pipe.c:
271 * dbus/dbus-transport-unix.c:
272 Fix documentation warnings.
274 2003-03-26 Havoc Pennington <hp@pobox.com>
276 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
277 after every test so it's quick and easy to see which leaked, and
278 so we test multiple dbus_shutdown() calls
280 * configure.in: change configure.in XML stuff to also support
283 * config-loader-libxml.c: some hacking
285 * config-loader-expat.c: some hacking
287 * config-parser.c: some hacking, plus tests
289 2003-03-25 Havoc Pennington <hp@redhat.com>
291 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
293 * configure.in: add --with-xml option to specify XML library,
294 right now only libxml is supported.
296 * bus/config-loader-libxml.c, config-parser.c: sync some minor
297 nonworking code between home and work, still just stubs
299 2003-03-24 Havoc Pennington <hp@redhat.com>
301 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
304 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
305 NULL argument for "message" if the error is a well-known one,
306 fill in a generic message in this case.
308 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
311 * bus/test.c (bus_test_flush_bus): add
313 * bus/policy.c (bus_policy_test): test code stub
315 2003-03-24 Havoc Pennington <hp@pobox.com>
317 * bus/connection.c (bus_connections_setup_connection): set up
318 the "can this user connect" function, but it always returns
319 TRUE until we have a config file parser so we can have a config
320 file that allows connections.
322 2003-03-23 Havoc Pennington <hp@pobox.com>
324 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
325 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
326 the mutex, so we can check for proper memory management
329 * dbus/dbus-dataslot.c: remove the mutex from
330 DBusDataSlotAllocator and lock it manually when using it,
331 to simplify fitting it into the global slots framework.
333 * dbus/dbus-threads.c (init_static_locks): rework how we're
334 handling global locks so they are easily shut down.
336 * bus/policy.c (bus_policy_append_rule): fix
338 * bus/test-main.c (main): check for memleaks
340 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
341 test suite check for memleaks
343 * dbus/dbus-memory.c: add support in test mode for tracking
344 number of outstanding blocks
346 2003-03-23 Havoc Pennington <hp@pobox.com>
348 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
351 * dbus/dbus-hash.h: add ULONG hash keys
353 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
354 (_dbus_get_group_id): new function
356 2003-03-20 Havoc Pennington <hp@redhat.com>
358 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
360 (dbus_connection_get_unix_user): new function
362 2003-03-20 Havoc Pennington <hp@pobox.com>
364 * bus/connection.c (bus_connection_send_oom_error): assert that
366 (connection_execute_transaction): ditto
367 (bus_connection_preallocate_oom_error): fix to set the sender, and
368 set recipient to the destination service, not the bus driver
370 * bus/policy.c: hacking
372 * dbus/dbus-message.c (dbus_message_service_is): new function
373 (dbus_message_sender_is): new
375 2003-03-19 Havoc Pennington <hp@redhat.com>
377 * bus/policy.c: start sketching code for policy restrictions on
378 what connections can do.
380 2003-03-18 Havoc Pennington <hp@redhat.com>
382 * doc/TODO: some notes on high-level todo items. Little nitpick
383 stuff is all in @todo, so no need to add it here.
385 * doc/config-file.txt: some notes on how config file might look
387 2003-03-18 Anders Carlsson <andersca@codefactory.se>
393 2003-03-17 Havoc Pennington <hp@redhat.com>
395 * dbus/dbus-internals.h: add gcc attributes so that
396 our printf-style functions warn on bad arguments to
399 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
402 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
405 2003-03-17 Havoc Pennington <hp@redhat.com>
407 * bus/test-main.c (main): make it print something as it runs
408 so make check doesn't look stuck
410 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
411 from CVS, now obsolete
413 2003-03-17 Anders Carlsson <andersca@codefactory.se>
415 * bus/dispatch.c: (bus_dispatch):
416 Refetch the service name since it may have been reallocated
417 when dbus_message_set_sender was called.
419 * dbus/dbus-sysdeps.c: (_dbus_accept):
420 Add address and address length variables and use them to stop
421 valgrind from complaining.
423 2003-03-17 Havoc Pennington <hp@pobox.com>
425 All tests pass, no memleaks, no valgrind complaints.
427 * bus/test.c: refcount handler_slot
429 * bus/connection.c (bus_connections_new): refcount
432 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
433 bytes so that auth scripts pass.
435 * bus/dispatch.c: init message_handler_slot so it gets allocated
438 * bus/dispatch.c (message_handler_slot_ref): fix memleak
440 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
441 dealloc server_pipe_hash when no longer used for benefit of
444 * dbus/dbus-auth.c (process_command): memleak fix
446 * bus/dispatch.c (check_hello_message): memleak fix
448 2003-03-16 Havoc Pennington <hp@pobox.com>
450 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
452 2003-03-17 Anders Carlsson <andersca@codefactory.se>
454 * bus/activation.c (bus_activation_activate_service): Append
455 the pending activation entry to the list of pending activations.
457 2003-03-16 Havoc Pennington <hp@pobox.com>
459 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
462 * dbus/dbus-address.c (create_entry): fix OOM handling when
463 failing to alloc entry->method
465 2003-03-16 Havoc Pennington <hp@pobox.com>
467 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
470 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
471 add some missing dbus_set_result
473 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
474 alloc the DBusMessageHandler
476 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
477 the transport here, since we call this from the finalizer; it
478 resulted in a double-finalize.
480 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
481 where we tried to use transport->connection that was NULL,
482 happened when transport was disconnected early on due to OOM
484 * bus/*.c: adapt to handle OOM for watches/timeouts
486 * dbus/dbus-transport-unix.c: port to handle OOM during
489 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
490 reference to unused bytes instead of a copy
492 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
495 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
498 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
501 2003-03-16 Anders Carlsson <andersca@codefactory.se>
503 * doc/dbus-specification.sgml:
504 Document reply message for ActivateService.
506 2003-03-16 Anders Carlsson <andersca@codefactory.se>
508 * bus/activation.c: (bus_pending_activation_entry_free),
509 (bus_pending_activation_free), (bus_activation_new),
510 (bus_activation_unref), (bus_activation_service_created),
511 (bus_activation_activate_service):
513 * bus/bus.c: (bus_context_new):
514 * bus/desktop-file.c: (new_section):
515 * bus/driver.c: (bus_driver_send_service_deleted),
516 (bus_driver_handle_activate_service):
517 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
519 * dbus/dbus-connection.c:
520 (dbus_connection_send_with_reply_and_block):
521 * dbus/dbus-message.c: (dbus_message_append_args_valist):
522 * dbus/dbus-protocol.h:
523 Make activation work better. Now pending activations will be queued
524 and the daemon won't try to activate services that are already registered.
526 2003-03-16 Havoc Pennington <hp@pobox.com>
528 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
531 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
532 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
534 2003-03-16 Havoc Pennington <hp@pobox.com>
536 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
537 this. always run the test suite before commit...
539 * bus/*: adapt to DBusConnection API changes
541 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
542 requires renaming stuff to avoid dbus_connection_dispatch name
545 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
548 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
549 separate from _dbus_message_loader_return_buffer()
551 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
552 this, because it's now always broken to use; the number of
553 messages in queue vs. the number still buffered by the message
554 loader is undefined/meaningless. Should use
555 dbus_connection_get_dispatch_state().
556 (dbus_connection_dispatch): rename from
557 dbus_connection_dispatch_message
559 2003-03-16 Havoc Pennington <hp@pobox.com>
561 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
564 2003-03-16 Anders Carlsson <andersca@codefactory.se>
566 * dbus/dbus-connection.c:
567 (dbus_connection_send_with_reply_and_block):
568 Decrease connection->n_incoming when removing an entry
570 * dbus/dbus-dict.c: (dbus_dict_entry_free),
571 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
572 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
573 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
574 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
575 (dbus_dict_get_byte_array):
576 Handle NULL arrays and strings. Also add support for byte arrays.
578 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
579 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
580 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
581 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
582 (_dbus_demarshal_dict), (demarshal_and_validate_len),
583 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
584 * dbus/dbus-marshal.h:
585 Add support for marshalling and demarshalling empty arrays and strings.
587 * dbus/dbus-message.c: (dbus_message_append_args_valist),
588 (dbus_message_append_string_array),
589 (dbus_message_iter_get_boolean),
590 (dbus_message_iter_get_boolean_array),
591 (dbus_message_iter_get_int32_array),
592 (dbus_message_iter_get_uint32_array),
593 (dbus_message_iter_get_double_array),
594 (dbus_message_iter_get_byte_array),
595 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
596 (check_message_handling):
597 Add support for getting empty arrays and dicts.
599 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
600 Don't do any validation at all for now, that's better than just checking
603 * test/data/valid-messages/emptiness.message:
604 New test message with lots of empty arrays.
606 2003-03-16 Havoc Pennington <hp@pobox.com>
608 * dbus/dbus-connection.c
609 (_dbus_connection_queue_received_message_link): new function that
610 can't fail due to OOM
612 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
613 new function pops a message together with a list link
616 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
617 message queuing functions to avoid needing to alloc memory
619 2003-03-16 Havoc Pennington <hp@pobox.com>
621 Oops - test code was only testing failure of around 30 of the
622 mallocs in the test path, but it turns out there are 500+
623 mallocs. I believe this was due to misguided linking setup such
624 that there was one copy of dbus_malloc etc. in the daemon and one
625 in the shared lib, and only daemon mallocs were tested. In any
626 case, the test case now tests all 500+ mallocs, and doesn't pass
627 yet, though there are lots of fixes in this patch.
629 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
630 this so that it doesn't need to allocate memory, since it
631 has no way of indicating failure due to OOM (and would be
634 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
636 * bus/Makefile.am: rearrange to create two self-contained
637 libraries, to avoid having libraries with overlapping symbols.
638 that was resulting in weirdness, e.g. I'm pretty sure there
639 were two copies of global static variables.
641 * dbus/dbus-internals.c: move the malloc debug stuff to
644 * dbus/dbus-list.c (free_link): free list mempool if it becomes
647 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
649 * dbus/dbus-address.c (dbus_parse_address): free list nodes
652 * bus/dispatch.c (bus_dispatch_add_connection): free
653 message_handler_slot when no longer using it, so
654 memory leak checkers are happy for the test suite.
656 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
658 * bus/bus.c (new_connection_callback): disconnect in here if
659 bus_connections_setup_connection fails.
661 * bus/connection.c (bus_connections_unref): fix to free the
663 (bus_connections_setup_connection): if this fails, don't
664 disconnect the connection, just be sure there are no side
667 * dbus/dbus-string.c (undo_alignment): unbreak this
669 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
671 (_dbus_auth_new): fix the order in which we free strings
674 * bus/connection.c (bus_connection_disconnected): fix to
675 not send ServiceDeleted multiple times in case of memory
678 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
679 get the base service name
680 (dbus_bus_register_client): don't return base service name,
681 instead store it on the DBusConnection and have an accessor
683 (dbus_bus_register_client): rename dbus_bus_register()
685 * bus/dispatch.c (check_hello_message): verify that other
686 connections on the bus also got the correct results, not
687 just the one sending hello
689 2003-03-15 Havoc Pennington <hp@pobox.com>
691 Make it pass the Hello handling test including all OOM codepaths.
692 Now to do other messages...
694 * bus/services.c (bus_service_remove_owner): fix crash when
695 removing owner from an empty list of owners
696 (bus_registry_ensure): don't leave service in the list of
697 a connection's owned services if we fail to put the service
700 * bus/connection.c (bus_connection_preallocate_oom_error): set
701 error flag on the OOM error.
703 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
704 handle _dbus_transport_set_connection failure
706 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
707 to create watches up front and simply enable/disable them as
709 (unix_connection_set): this can now fail on OOM
711 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
712 of enabling/disabling a watch or timeout.
714 * bus/loop.c (bus_loop_iterate): don't touch disabled
717 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
719 2003-03-15 Havoc Pennington <hp@pobox.com>
721 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
722 write useful test code, after all that futzing around ;-)
724 Test does not yet pass because we can't handle OOM in
725 _dbus_transport_messages_pending (basically,
726 dbus_connection_preallocate_send() does not prealloc the write
727 watch). To fix this, I think we need to add new stuff to
728 set_watch_functions, namely a SetEnabled function so we can alloc
729 the watch earlier, then enable it later.
731 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
732 dbus-memory.c to the convenience lib
734 * bus/test.c: rename some static functions to keep them clearly
735 distinct from stuff in connection.c. Handle client disconnection.
737 2003-03-14 Havoc Pennington <hp@pobox.com>
739 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
740 transport, tests more of the real codepath. Set up clients
741 with bus_setup_debug_client.
743 * bus/test.c (bus_setup_debug_client): function to set up debug
744 "clients" on the main loop
746 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
749 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
752 * dbus/dbus-server-debug.c: support a debug server based on pipes
754 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
755 (_dbus_close): new function
757 * configure.in: check for socketpair
759 2003-03-14 Havoc Pennington <hp@redhat.com>
761 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
764 * dbus/dbus-transport-debug.c: rework this a good bit to be
765 less complicated. hopefully still works.
767 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
770 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
773 * dbus/dbus-message.c (dbus_message_copy): rename from
774 dbus_message_new_from_message, fix it up to copy
775 all the message fields, add test case
777 * bus/dispatch.c (bus_dispatch_test): add some more test code,
778 not quite passing yet
780 2003-03-14 Havoc Pennington <hp@pobox.com>
782 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
783 until no work remains" in test code. (the large diff here
784 is just code movement, no actual changes)
786 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
787 1, no point waiting around for test code.
788 (_dbus_server_debug_accept_transport): unref the timeout
789 after adding it (right?)
791 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
793 2003-03-13 Havoc Pennington <hp@redhat.com>
795 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
798 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
801 * dbus/dbus-connection.h: Make AddWatchFunction and
802 AddTimeoutFunction return a bool so they can fail on out-of-memory
804 * bus/bus.c (bus_context_new): set up timeout handlers
806 * bus/connection.c (bus_connections_setup_connection): set up
809 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
812 * bus/bus.c (bus_context_new): adapt to changes
814 * bus/connection.c: adapt to changes
816 * test/watch.c: adapt to DBusWatch changes
818 * bus/dispatch.c (bus_dispatch_test): started adding this but
821 2003-03-14 Anders Carlsson <andersca@codefactory.se>
823 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
825 2003-03-13 Havoc Pennington <hp@pobox.com>
827 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
828 set up a test framework as for the library
830 2003-03-12 Havoc Pennington <hp@pobox.com>
832 Throughout: purge global variables, introduce BusActivation,
833 BusConnections, BusRegistry, etc. objects instead.
835 * bus/bus.h, bus/bus.c: introduce BusContext as a global
838 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
839 going to redo this a bit differently I think
841 2003-03-12 Havoc Pennington <hp@redhat.com>
843 Mega-patch that gets the message bus daemon initially handling
844 out-of-memory. Work still needed. Also lots of random
845 moving stuff to DBusError instead of ResultCode.
847 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
849 * dbus/dbus-connection.c
850 (dbus_connection_send_with_reply_and_block): use DBusError
852 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
855 * dbus/dbus-connection.c (dbus_connection_send): drop the result
856 code here, as the only failure possible is OOM.
858 * bus/connection.c (bus_connection_disconnect):
859 rename bus_connection_disconnected as it's a notification only
861 * bus/driver.c (bus_driver_handle_acquire_service): don't free
862 "name" on get_args failure, should be done by get_args;
863 don't disconnect client for bad args, just return an error.
864 (bus_driver_handle_service_exists): ditto
866 * bus/services.c (bus_services_list): NULL-terminate returned array
868 * bus/driver.c (bus_driver_send_service_lost)
869 (bus_driver_send_service_acquired): send messages from driver to a
870 specific client to the client's unique name, not to the broadcast
873 * dbus/dbus-message.c (decode_header_data): reject messages that
874 contain no name field
875 (_dbus_message_get_client_serial): rename to
876 dbus_message_get_serial and make public
877 (_dbus_message_set_serial): rename from set_client_serial
878 (_dbus_message_set_reply_serial): make public
879 (_dbus_message_get_reply_serial): make public
881 * bus/connection.c (bus_connection_foreach): allow stopping
882 iteration by returning FALSE from foreach function.
884 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
885 (dbus_connection_free_preallocated_send)
886 (dbus_connection_preallocate_send): new API for sending a message
887 without possibility of malloc failure.
888 (dbus_connection_send_message): rename to just
889 dbus_connection_send (and same for whole function family)
891 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
893 * dbus/dbus-sysdeps.c (_dbus_exit): new function
895 * bus/activation.c: handle/return errors
897 * dbus/dbus-errors.h: add more DBUS_ERROR #define
899 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
900 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
901 (_dbus_result_from_errno): move to this file
903 2003-03-10 Anders Carlsson <andersca@codefactory.se>
905 * dbus/dbus-marshal.c:
906 (_dbus_marshal_set_string):
907 Take a length argument so we can marshal the correct string
910 (_dbus_marshal_dict), (_dbus_demarshal_dict),
911 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
912 (_dbus_marshal_test):
913 * dbus/dbus-marshal.h:
914 Add support for marshalling and demarshalling dicts.
916 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
917 Add support for TYPE DICT.
919 * dbus/dbus-message.c: (set_string_field):
920 Adjust header padding.
922 (dbus_message_append_args_valist), (dbus_message_append_dict),
923 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
924 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
925 (check_message_handling), (check_have_valid_message):
926 * dbus/dbus-message.h:
927 Add functions for setting and getting dicts.
929 * dbus/dbus-protocol.h:
935 * doc/dbus-specification.sgml:
936 Add information about how dicts are marshalled.
938 * test/data/invalid-messages/dict-with-nil-value.message:
939 * test/data/invalid-messages/too-short-dict.message:
940 * test/data/valid-messages/dict-simple.message:
941 * test/data/valid-messages/dict.message:
942 Add sample messages containing dicts.
944 2003-03-08 Anders Carlsson <andersca@codefactory.se>
946 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
948 2003-03-07 Anders Carlsson <andersca@codefactory.se>
951 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
952 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
953 (dbus_dict_set_int32), (dbus_dict_set_uint32),
954 (dbus_dict_set_double), (dbus_dict_set_string),
955 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
956 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
957 (dbus_dict_set_string_array), (_dbus_dict_test):
959 Fix according to comments from Havoc.
961 2003-03-06 Michael Meeks <michael@server.home>
963 * configure.in: if we don't have kde-config, disable have_qt.
965 2003-03-07 Anders Carlsson <andersca@codefactory.se>
970 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
971 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
972 (dbus_dict_remove), (dbus_dict_get_value_type),
973 (dbus_dict_get_keys), (dbus_dict_put_boolean),
974 (dbus_dict_put_int32), (dbus_dict_put_uint32),
975 (dbus_dict_put_double), (dbus_dict_put_string),
976 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
977 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
978 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
979 (dbus_dict_get_int32), (dbus_dict_get_uint32),
980 (dbus_dict_get_double), (dbus_dict_get_string),
981 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
982 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
983 (dbus_dict_get_string_array), (_dbus_dict_test):
985 Add DBusDict implementation
987 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
991 2003-03-04 Havoc Pennington <hp@pobox.com>
993 * test/data/auth/*: adapt to changes
995 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
996 USERID_BASE64 and change USERNAME_BASE64 to put in username not
999 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1000 more stuff from being in a context name, to make the protocol
1001 simpler to deal with
1003 * dbus/dbus-errors.c (dbus_error_has_name): new function
1004 (dbus_error_is_set): new function
1006 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1007 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1009 * dbus/dbus-connection.c (dbus_connection_flush): also read
1010 messages during a flush operation
1012 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1014 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1016 * configure.in: Check for gethostbyname on Solaris.
1018 * dbus/dbus-transport.c: (_dbus_transport_open):
1019 Remove duplicate "tcp" entry.
1021 * doc/dbus-specification.sgml:
1022 Clarify some things.
1024 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1026 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1027 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1028 (_dbus_keyring_test):
1029 * dbus/dbus-md5.c: (_dbus_md5_compute):
1030 * dbus/dbus-sha.c: (_dbus_sha_compute):
1033 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1035 * README: Add some things.
1037 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1039 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1040 after case DBUS_TYPE_BOOELAN.
1042 2003-03-02 Havoc Pennington <hp@pobox.com>
1044 * test/break-loader.c (randomly_set_extreme_ints): add test that
1045 sets really huge and small integers
1047 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1048 that length of boolean array fits in the string, and that
1049 string has room for boolean value in single-bool case.
1051 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1052 optional value to "ALIGN" command which is what to fill the
1055 * test/data/valid-messages/no-padding.message: add regression
1056 test for the message padding problem
1058 2003-03-02 Havoc Pennington <hp@pobox.com>
1060 * dbus/dbus-message.c (decode_header_data): fix to always init
1061 message_padding, from Benjamin Dauvergne
1063 2003-03-02 Havoc Pennington <hp@pobox.com>
1069 2003-03-01 Joe Shaw <joe@assbarn.com>
1071 * configure.in: Check for "struct cmsgcred" and try to access its
1072 members for BSD-like unices.
1074 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1075 _dbus_read_credentials_unix_socket().
1076 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1077 read() for reading the credential byte off the unix socket. Use
1078 struct cmsgcred on systems that support it.
1080 2003-02-27 Alexander Larsson <alexl@redhat.com>
1084 Make gthreads-2.0 dependency optional. Don't build thread test if
1087 2003-02-27 Havoc Pennington <hp@pobox.com>
1089 * dbus/dbus-connection.c
1090 (dbus_connection_send_message_with_reply_and_block): fix doh!
1091 doh! doh! bug that resulted in never removing a reply from the
1092 queue, no wonder we called get_reply_serial so much ;-)
1094 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1095 and client serial instead of demarshaling them every time
1097 2003-02-27 Havoc Pennington <hp@pobox.com>
1099 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1100 more inlined, using dbus-string-private.h, speeds things up
1103 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1104 when freeing the string
1105 (_dbus_string_steal_data): fix for align offset
1106 (undo_alignment): new function
1108 2003-02-26 Havoc Pennington <hp@redhat.com>
1110 All kinds of audit fixes from Owen, plus initial attempt to
1111 handle unaligned memory returned from malloc.
1113 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1114 leave room for align_offset and nul byte
1115 (fixup_alignment): function to track an align_offset and
1116 ensure real->str is aligned
1117 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1118 to allow a nul byte plus align offset
1119 (_dbus_string_lock): fix overflow issue
1120 (_dbus_string_init_const_len): add assertions on sanity of len,
1121 assign allocated to be ALLOCATION_PADDING larger than len
1122 (set_length): fixup the overflow handling
1123 (_dbus_string_get_data_len): fix overflow in assertion
1124 (open_gap): detect overflow in size of gap to be opened
1125 (_dbus_string_lengthen): add overflow check
1126 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1127 (_dbus_string_append): add overflow check
1128 (_dbus_string_append_unichar): overflow
1129 (_dbus_string_delete): fix overflow in assertion
1130 (_dbus_string_copy_len): overflow in assertion
1131 (_dbus_string_replace_len): overflows in assertions
1132 (_dbus_string_find): change to implement in terms of
1133 _dbus_string_find_to
1134 (_dbus_string_find_to): assorted fixage
1135 (_dbus_string_equal_c_str): assert c_str != NULL,
1136 fix logic so the function works
1137 (_dbus_string_ends_with_c_str): fix overflow thingy
1138 (_dbus_string_base64_encode): overflow fix
1139 (_dbus_string_validate_ascii): overflow
1140 (_dbus_string_validate_nul): overflow
1142 2003-02-26 Havoc Pennington <hp@redhat.com>
1144 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1146 2003-02-26 Alexander Larsson <alexl@redhat.com>
1149 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1151 * dbus/dbus-connection.c:
1152 * dbus/dbus-connection.h:
1153 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1154 Add dbus_connection_set_wakeup_main_function and use it when queueing
1155 incoming and outgoing messages.
1158 * dbus/dbus-dataslot.c:
1159 Threadsafe usage of DBusDataSlotAllocator
1161 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1164 * dbus/dbus-server-unix.c:
1167 * glib/dbus-gmain.c:
1168 Implement the new wakeup functions for glib.
1171 * glib/test-thread-client.c:
1172 * glib/test-thread-server.c:
1173 * glib/test-thread.h:
1174 Initial cut at some thread test code. Not really done yet.
1176 2003-02-26 Havoc Pennington <hp@pobox.com>
1178 * dbus/dbus-connection.c
1179 (dbus_connection_send_message_with_reply_and_block): fix crash
1180 where we ref'd the outgoing message instead of the returned reply
1182 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1183 at the end of this function, so if we didn't need to read for
1184 authentication, we reinstall it for receiving messages
1186 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1187 a NULL sender for peer-to-peer case
1189 * dbus/dbus-transport-unix.c (check_read_watch): handle
1190 !authenticated case correctly
1192 * glib/dbus-gmain.c: add support for DBusServer
1194 * dbus/dbus-server.c: add data slot support
1196 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1197 return values and handle errors
1199 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1202 * Doxyfile.in (INPUT): add glib subdir
1204 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1205 setup_with_g_main instead of hookup_with_g_main; write docs
1207 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1209 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1210 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1211 * dbus/dbus-message.c: (dbus_message_append_boolean),
1212 (dbus_message_append_boolean_array),
1213 (dbus_message_get_args_valist), (_dbus_message_test):
1214 * dbus/dbus-message.h:
1215 * doc/dbus-specification.sgml:
1216 Various fixes as pointed out by Havoc.
1218 * test/data/invalid-messages/bad-boolean-array.message:
1219 * test/data/invalid-messages/bad-boolean.message:
1220 Add invalid boolean value test cases.
1222 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1224 * dbus/dbus-internals.c: (_dbus_type_to_string):
1225 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1226 (_dbus_marshal_validate_arg):
1227 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1228 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1229 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1230 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1231 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1232 (dbus_message_iter_get_double),
1233 (dbus_message_iter_get_boolean_array), (message_iter_test):
1234 * dbus/dbus-message.h:
1235 * dbus/dbus-protocol.h:
1236 * doc/dbus-specification.sgml:
1237 * test/data/valid-messages/lots-of-arguments.message:
1238 Add support for boolean and boolean array types.
1240 2003-02-23 Havoc Pennington <hp@pobox.com>
1242 * dbus/dbus-keyring.c: finish most of this implementation and
1245 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1246 these barf if the error isn't cleared to NULL
1248 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1249 (_dbus_create_directory): new function
1251 * dbus/dbus-errors.c (dbus_set_error): fix warning
1253 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1254 (_dbus_string_hex_decode): new function
1255 (test_hex_roundtrip): test code
1257 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1259 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1261 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1262 the save-to-temp/rename trick to atomically write the new file
1263 (_dbus_string_parse_uint): new function
1265 2003-02-22 Havoc Pennington <hp@pobox.com>
1267 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1269 2003-02-22 Havoc Pennington <hp@pobox.com>
1271 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1272 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1274 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1276 * dbus/test/data/sha-1: add US government test suite for SHA-1
1278 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1280 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1281 Make string arrays NULL-terminated.
1283 * dbus/dbus-memory.c: (dbus_free_string_array):
1284 * dbus/dbus-memory.h:
1285 New function for freeing NULL-terminated string arrays.
1287 * dbus/dbus-message-builder.c: (append_quoted_string),
1288 (_dbus_message_data_load):
1289 Add support for array types.
1291 * dbus/dbus-message.c: (check_message_handling):
1292 Add more types as test cases.
1294 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1295 (_dbus_string_parse_double):
1296 Add the start offset to the end offset.
1298 * test/data/valid-messages/lots-of-arguments.message:
1299 New test message with lots of arguments.
1301 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1303 * dbus/dbus-message.c: (dbus_message_append_nil),
1304 (dbus_message_append_int32), (dbus_message_append_uint32),
1305 (dbus_message_append_double), (dbus_message_append_string),
1306 (dbus_message_append_int32_array),
1307 (dbus_message_append_uint32_array),
1308 (dbus_message_append_double_array),
1309 (dbus_message_append_byte_array),
1310 (dbus_message_append_string_array):
1311 Fix all out-of-memory handling in these functions.
1313 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1315 * dbus/dbus-message.c: (dbus_message_append_nil):
1318 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1320 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1321 (dbus_message_append_nil), (dbus_message_append_int32_array),
1322 (dbus_message_append_uint32_array),
1323 (dbus_message_append_double_array),
1324 (dbus_message_append_byte_array),
1325 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1326 (dbus_message_iter_get_int32_array),
1327 (dbus_message_iter_get_uint32_array),
1328 (dbus_message_iter_get_double_array),
1329 (dbus_message_iter_get_byte_array),
1330 (dbus_message_iter_get_string_array):
1332 * dbus/dbus-message.h:
1333 Add functions for appending and getting arrays.
1335 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1337 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1338 element size at least 8 bytes, fixes mempool tests on
1341 2003-02-20 Alexander Larsson <alexl@redhat.com>
1343 * dbus/dbus-transport-unix.c (unix_do_iteration):
1344 Unlock the connection mutex during a blocking select call.
1345 Add todo about how we need a way to wake up the select.
1347 * dbus/dbus-connection-internal.h:
1348 * dbus/dbus-connection.c:
1349 Add _dbus_connection_lock and _dbus_connection_unlock.
1351 2003-02-19 Havoc Pennington <hp@pobox.com>
1353 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1354 Doxyfile.in, not Doxyfile
1356 * dbus/dbus-keyring.c: do some hacking on this
1358 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1360 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1362 (dbus_set_error): remove dbus_error_init, check for message ==
1363 NULL *before* we sprintf into it, and add @todo about including
1364 system headers in this file
1366 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1368 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1370 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1371 get various bits of user information based on either username
1373 (_dbus_homedir_from_username): new function
1375 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1378 Add check for nonposix getpwnam_r
1380 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1381 Align the pool element size to a sizeof (void *) boundary.
1383 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1384 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1385 General Solaris fixes.
1387 * test/data/valid-messages/simplest-manual.message:
1388 Explicitly state that we want little-endian packing.
1390 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1392 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1394 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1395 Added to create a transport connecting using a tcp/ip socket.
1397 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1398 to a tcp socket at given host and port.
1399 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1402 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1404 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1405 Added to create a server listening on a TCP/IP socket.
1407 2003-02-19 Havoc Pennington <hp@pobox.com>
1409 Throughout: mop up all the Doxygen warnings and undocumented
1412 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1413 to search any paths.
1415 * dbus/dbus-threads.c: move global mutex initializers to
1416 dbus-internals.h, multiple prototypes was confusing doxygen
1417 besides being kind of ugly
1419 * Doxyfile (PREDEFINED): have Doxygen define
1420 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1421 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1422 (do not abuse the feature! it's for stuff like the autogenerated
1423 macros in dbus-md5.c, not just for things you don't feel like
1426 2003-02-18 Havoc Pennington <hp@pobox.com>
1428 * dbus/dbus-string.c (_dbus_string_zero): new function
1430 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1431 wrap it in some dbus-friendly API
1433 * dbus/dbus-types.h: add 16-bit types
1435 2003-02-18 Joe Shaw <joe@assbarn.com>
1437 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1438 credentials from our currently running process.
1439 (get_word): Fix a buglet where we were copying the entire length
1440 instead of relative to our position.
1442 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1443 keys on the stack... it's 640k of data.
1445 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1446 read the credentials byte off the socket, even if we don't have
1448 (_dbus_poll): Implement poll() using select() for systems which
1451 * glib/test-dbus-glib.c (main): Print out an error if no
1452 parameters are given.
1454 * test/data/auth/fallback.auth-script: Added. Tests that a client
1455 can fallback to a secondary auth mechanism if the first fails.
1457 2003-02-18 Havoc Pennington <hp@pobox.com>
1461 2003-02-17 Havoc Pennington <hp@pobox.com>
1463 * doc/dbus-specification.sgml: lots of cosmetic
1464 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1465 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1466 s/server/bus/ (except in authentication section). Add a section
1467 "Message Bus Message Routing"
1469 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1475 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1477 * doc/dbus-specification.sgml:
1478 Specification updates.
1480 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1482 * bus/activation.c: (bus_activation_init), (child_setup),
1483 (bus_activation_activate_service):
1485 * bus/main.c: (main):
1486 Set DBUS_ADDRESS environment variable.
1488 * dbus/dbus-errors.c: (dbus_set_error):
1489 Don't use va_copy since that's a C99 feature.
1491 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1492 (_dbus_spawn_async):
1493 * dbus/dbus-sysdeps.h:
1494 Add child_setup_func to _dbus_spawn_async.
1496 * doc/dbus-specification.sgml:
1497 Update specification.
1499 * test/spawn-test.c: (setup_func), (main):
1502 2003-02-17 Alexander Larsson <alexl@redhat.com>
1504 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1507 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1511 * doc/dbus-test-plan.sgml:
1512 Add test plan document.
1517 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1519 * dbus/dbus-message.c: (decode_header_data),
1520 (_dbus_message_loader_return_buffer):
1521 Set the header padding amount when loading a message.
1523 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1525 * bus/dispatch.c: (send_one_message):
1526 Only send broadcast messages to registered connections.
1528 * dbus/dbus-message.c: (dbus_message_name_is):
1529 * dbus/dbus-message.h:
1530 New convenience function.
1532 * dbus/dbus-transport-debug.c: (do_reading):
1533 Only dispatch one message per run.
1536 * test/bus-test.c: (new_connection_callback), (die),
1537 (test_hello_client1_handler), (test_hello_client2_handler),
1538 (test_hello_replies), (main):
1540 * test/bus-test-loop.[ch]:
1543 2003-02-16 Havoc Pennington <hp@pobox.com>
1545 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1546 backward conditional
1548 2003-02-16 Alexander Larsson <alexl@redhat.com>
1550 * dbus/dbus-connection.c:
1551 Implement sent_message_with_reply. (with_reply_and block is still
1553 Made dispatch_message not lose message if OOM.
1555 * dbus/dbus-errors.h:
1556 Add NoReply error (for reply timeouts).
1558 2003-02-16 Alexander Larsson <alexl@redhat.com>
1560 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1561 Actually free keys and values when destroying hashtable.
1563 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1565 * dbus/dbus-auth.c: (client_try_next_mechanism):
1568 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1569 Return TRUE if there's no thread implementation around.
1571 * glib/dbus-gmain.c: (free_source),
1572 (dbus_connection_hookup_with_g_main):
1573 Make sure to remove the GSource when the connection is finalized.
1575 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1577 * bus/dispatch.c: (bus_dispatch_message_handler):
1578 * dbus/dbus-errors.h:
1579 Return an error if someone tries to send a message to a service
1582 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1584 * bus/activation.c: (load_directory), (bus_activation_init),
1585 (bus_activation_activate_service):
1588 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1589 More work on the activation handling.
1591 * dbus/dbus-errors.h:
1592 Add some error messages
1594 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1595 * dbus/dbus-message.h:
1596 New function that creates an error message.
1598 * dbus/dbus-protocol.h:
1599 Add ACTIVATE_SERVER message.
1601 * dbus/dbus-server-unix.c: (unix_handle_watch),
1602 (_dbus_server_new_for_domain_socket):
1603 Call _dbus_fd_set_close_on_exec.
1605 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1606 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1607 (_dbus_fd_set_close_on_exec):
1608 * dbus/dbus-sysdeps.h:
1609 Add _dbus_fd_set_close_on exec function. Also add function that checks
1610 that all open fds are set to close-on-exec and warns otherwise.
1612 * dbus/dbus-transport-unix.c:
1613 (_dbus_transport_new_for_domain_socket):
1614 Call _dbus_fd_set_close_on_exec.
1616 2003-02-16 Havoc Pennington <hp@pobox.com>
1618 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1619 allow people to avoid setting SIGPIPE to SIG_IGN
1620 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1621 we've been asked not to
1623 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1625 * dbus/dbus-list.c: (_dbus_list_append_link),
1626 (_dbus_list_prepend_link):
1627 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1631 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1634 * bus/activation.c: (bus_activation_entry_free),
1635 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1637 * bus/main.c: (main):
1638 Add simple activation support, doesn't work yet though.
1640 2003-02-15 Zack Rusin <zack@kde.org>
1642 * qt/dbus-qthread.cpp: small casting fix
1644 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1646 * dbus/dbus-errors.c: (dbus_set_error):
1647 * dbus/dbus-errors.h:
1648 Add a few errors and make dbus_set_error void.
1650 * dbus/dbus-sysdeps.c:
1651 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1652 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1653 * dbus/dbus-sysdeps.h:
1654 Add _dbus_spawn_async.
1656 * test/spawn-test.c: (main):
1657 Test for _dbus_spawn_async.
1659 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1661 * dbus/dbus-internals.h:
1662 Fix build without tests.
1664 * dbus/dbus-list.c: (alloc_link):
1665 Fix a segfault when a malloc fails.
1667 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1668 (dbus_malloc0), (dbus_realloc):
1669 Add support for malloc debugging.
1671 2003-02-15 Alexander Larsson <alexl@redhat.com>
1673 * dbus/dbus-threads.c:
1674 * dbus/dbus-threads.h:
1675 Add condvars. Remove static mutext from API.
1676 Implement static mutexes by initializing them from threads_init.
1678 * glib/dbus-gthread.c:
1679 * qt/dbus-qthread.cpp:
1680 Update with the thread api changes.
1685 Turn StaticMutex into normal mutex + init function.
1686 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1687 _dbus_list_append_link, _dbus_list_prepend_link
1690 * dbus/dbus-sysdeps.c:
1691 * dbus/dbus-sysdeps.h:
1692 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1693 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1695 * dbus/dbus-protocol.h:
1696 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1698 * dbus/dbus-message.c:
1699 Make ref/unref atomic.
1702 * dbus/dbus-connection-internal.h:
1703 * dbus/dbus-connection.c:
1704 * dbus/dbus-connection.h:
1706 Change _peek to _borrow,_return & _steal_borrowed.
1707 Change disconnect callback to event.
1708 Make dbus_connection_dispatch_messages reentrant.
1710 * dbus/dbus-transport.c:
1711 Don't ref the connection on calls to the transport
1714 * dbus/dbus-message-handler.c:
1717 * glib/dbus-gmain.c:
1718 Don't use peek_message anymore
1721 * test/debug-thread.c:
1722 * test/debug-thread.h:
1723 Simple thread implementation that asserts() on deadlocks in
1724 single-threaded code.
1727 (main) Call debug_threads_init.
1730 Use disconnect message instead of disconnect callback.
1734 Don't call dbus_connection_set_disconnect_function. Instead export
1735 bus_connection_disconnect.
1738 Call bus_connection_disconnect when we get a disconnected message.
1740 2003-02-15 Havoc Pennington <hp@pobox.com>
1742 * dbus/dbus-message.c (dbus_message_new): fool around with the
1745 2003-02-14 Havoc Pennington <hp@pobox.com>
1747 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1749 * dbus/dbus-memory.c: fail if the debug functions indicate we
1752 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1753 (_dbus_decrement_fail_alloc_counter): debug functions to
1754 simulate memory allocation failures
1756 2003-02-14 Havoc Pennington <hp@pobox.com>
1758 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1761 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1763 * bus/driver.c: (bus_driver_handle_hello):
1765 * bus/services.c: (bus_service_lookup):
1766 Reorder message sending so we get a more sane order.
1768 * test/bus-test.c: (message_handler):
1771 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1773 * bus/driver.c: (bus_driver_send_service_deleted),
1774 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1775 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1776 (bus_driver_send_welcome_message),
1777 (bus_driver_handle_list_services),
1778 (bus_driver_handle_acquire_service),
1779 (bus_driver_handle_service_exists):
1780 * dbus/dbus-bus.c: (dbus_bus_register_client),
1781 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1782 * dbus/dbus-errors.c: (dbus_result_to_string):
1783 * dbus/dbus-errors.h:
1784 * dbus/dbus-message.c: (dbus_message_append_args),
1785 (dbus_message_append_args_valist), (dbus_message_get_args),
1786 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1787 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1788 (dbus_message_iter_get_byte_array),
1789 (dbus_message_iter_get_string_array), (message_iter_test),
1790 (check_message_handling), (_dbus_message_test):
1791 * dbus/dbus-message.h:
1792 * test/bus-test.c: (main):
1793 Change fields to arguments in messages, so that they won't be
1794 confused with header fields.
1796 * glib/test-dbus-glib.c: (main):
1797 Remove append_fields from hello message.
1799 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1801 * dbus/dbus-errors.c:
1802 * dbus/dbus-message.c:
1803 * dbus/dbus-string.c:
1804 Documentation fixes.
1806 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1808 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1810 Implement support for timeouts in dbus-glib.
1812 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1814 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1815 * dbus/dbus-message.c: (process_test_subdir):
1816 * test/break-loader.c: (find_breaks_based_on):
1817 Plug some memory leaks.
1819 2003-02-13 Richard Hult <rhult@codefactory.se>
1821 * bus/main.c: Fix build.
1823 * dbus/dbus-errors.h:
1824 * dbus/dbus-errors.c: Fix copyright for Anders.
1826 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1831 * bus/connection.c: (bus_connection_foreach):
1834 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1835 (unescape_string), (new_section), (parse_section_start),
1836 (parse_key_value), (report_error), (bus_desktop_file_load),
1837 (bus_desktop_file_get_string):
1838 * bus/desktop-file.h:
1839 Use DBusError for error reporting.
1841 * bus/dispatch.c: (send_one_message),
1842 (bus_dispatch_message_handler):
1843 * bus/driver.c: (bus_driver_send_service_deleted),
1844 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1845 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1846 (bus_driver_send_welcome_message),
1847 (bus_driver_handle_list_services),
1848 (bus_driver_handle_acquire_service),
1849 (bus_driver_handle_service_exists):
1850 * bus/loop.c: (bus_loop_run):
1852 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1854 * bus/utils.c: (bus_wait_for_memory):
1856 New files with general utility functions.
1858 * dbus/dbus-internals.h:
1859 Remove _DBUS_HANDLE_OOM.
1861 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1863 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1864 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1865 * dbus/dbus-errors.h:
1866 Add DBusError structure.
1868 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1870 * test/data/valid-messages/standard-acquire-service.message:
1871 * test/data/valid-messages/standard-hello.message:
1872 * test/data/valid-messages/standard-list-services.message:
1873 * test/data/valid-messages/standard-service-exists.message:
1874 Add some standard messages.
1876 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1878 * bus/driver.c: (bus_driver_send_welcome_message),
1879 (bus_driver_handle_list_services),
1880 (bus_driver_handle_acquire_service),
1881 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1882 Update for API changes in libdbus.
1884 * dbus/dbus-message.c: (dbus_message_new_reply):
1885 * dbus/dbus-message.h:
1886 Remove the name argument. The spec states that replies shouldn't
1889 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1891 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1892 (report_error), (bus_desktop_file_load), (lookup_section),
1893 (lookup_line), (bus_desktop_file_get_raw),
1894 (bus_desktop_file_get_string):
1895 * bus/desktop-file.h:
1896 Some fixes, and new functions for getting a key value from a section.
1898 2003-02-13 Havoc Pennington <hp@pobox.com>
1900 * test/data/auth/fail-after-n-attempts.auth-script: new test
1902 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1905 2003-02-13 Havoc Pennington <hp@pobox.com>
1907 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1908 dbus_credentials_match were backward
1910 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1911 NO_CREDENTIALS and ROOT_CREDENTIALS
1913 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1914 into here. Never process more commands after we've reached an
1915 end state; store further data as unused bytes.
1917 * test/data/auth/*: add more auth tests
1919 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1920 command to match exact string and EXPECT_UNUSED to match unused
1923 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1925 2003-02-12 Havoc Pennington <hp@pobox.com>
1927 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1928 \r off of popped lines
1930 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1933 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1936 2003-02-12 Havoc Pennington <hp@pobox.com>
1938 * dbus/Makefile.am: remove break-loader from the build, since it
1941 * configure.in: add --enable-gcov to turn on coverage profiling
1942 flags and disable optimization
1944 2003-02-10 Havoc Pennington <hp@pobox.com>
1946 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1947 initial cut at test framework for DBusAuth from laptop.
1948 Doesn't quite work yet but it compiles and I need to get
1949 it off the 266mhz laptop. ;-)
1951 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1952 fix a memleak in error case
1954 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1957 * bus/desktop-file.c:
1958 * bus/desktop-file.h:
1959 Add a desktop file parser.
1961 2003-02-11 Zack Rusin <zack@kde.org>
1963 * qt/message.[h|cpp]: sample implementation
1964 of the KDE wrapper for DBusMessage
1966 2003-02-09 Zack Rusin <zack@kde.org>
1968 * test/bus-test.c: make_it_compile
1969 * doc/dbus-specification.sgml: minimal semantic fix
1971 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1977 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1980 * dbus/dbus-break-loader.c:
1982 * test/break-loader.c:
1983 Move dbus-break-loader to test/ and rename it to break-loader.
1985 2003-02-02 Havoc Pennington <hp@pobox.com>
1987 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1988 for code to manage cookies in your home directory
1990 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1992 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1993 to authenticate, then disconnect the client.
1995 2003-02-03 Alexander Larsson <alexl@redhat.com>
1997 * dbus/dbus-message.c (dbus_message_append_fields):
2000 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2002 * doc/dbus-specification.sgml:
2003 Update address format section.
2005 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2008 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2009 (message_handler), (new_connection_callback), (loop_quit),
2013 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2015 * bus/driver.c: (bus_driver_handle_service_exists):
2016 Simplify the code a bit.
2018 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2021 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2024 Add libdbus-daemon.la and link to it.
2026 2003-02-01 James Willcox <jwillcox@gnome.org>
2028 * bus/driver.c: (bus_driver_handle_own_service):
2029 Actually include the service reply code in the message.
2031 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2033 * bus/driver.c: (bus_driver_handle_service_exists):
2034 Don't unref the incoming message.
2036 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2038 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2040 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2042 * dbus/dbus-server.c: (dbus_server_listen):
2043 * dbus/dbus-transport.c: (_dbus_transport_open):
2044 ifdef out the calls to the debug transport and server.
2046 2003-02-02 Alexander Larsson <alexl@redhat.com>
2048 * dbus/dbus-watch.c (dbus_watch_get_flags):
2049 Add note in the docs that ERROR or HANGUP won't be returned
2050 and are assumed always on.
2052 * glib/dbus-gmain.c (add_watch):
2053 Always add IO_ERR | IO_HUP
2055 * dbus/dbus-message.h:
2056 Add semicolon after dbus_message_iter_get_string_array().
2057 Makes qt code build again
2059 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2061 * bus/driver.c: (create_unique_client_name),
2062 (bus_driver_handle_hello):
2063 Don't take a name, just use a numeric id to identify
2067 * dbus/dbus-bus.c: (dbus_bus_register_client),
2068 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2070 Add new convenience functions for communicating with the bus.
2072 * dbus/dbus-message.h:
2074 * dbus/dbus-protocol.h:
2077 2003-02-01 Alexander Larsson <alexl@redhat.com>
2079 * dbus/dbus-message.c (dbus_message_append_fields):
2080 Add some more doc comments.
2082 2003-02-01 Havoc Pennington <hp@pobox.com>
2084 * dbus/dbus-break-loader.c (randomly_modify_length): change
2085 a 4-byte value in the message as if it were a length
2087 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2088 execute bit on saved files
2090 2003-02-01 Havoc Pennington <hp@pobox.com>
2092 * dbus/dbus-break-loader.c (main): new program to find messages
2093 that break the loader.
2095 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2096 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2098 * dbus/dbus-string.c (_dbus_string_set_byte): new
2100 2003-01-31 Havoc Pennington <hp@pobox.com>
2102 * dbus/dbus-message.c: refactor the test code to be more general,
2103 in preparation for writing a "randomly permute test cases to
2104 try to break the loader" program.
2106 2003-01-31 Havoc Pennington <hp@pobox.com>
2108 * doc/dbus-specification.sgml: work on the specification
2110 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2111 the protocol version of the message.
2113 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2114 no longer specifies that.
2115 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2118 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2119 "break" for DBUS_TYPE_NIL, remove @todo
2121 2003-01-31 Havoc Pennington <hp@pobox.com>
2123 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2124 just set_is_error/get_is_error as this is a commonly-used
2125 function, and write docs.
2127 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2129 * dbus/dbus-address.c: (dbus_address_entry_free):
2130 Free key and value lists.
2132 * dbus/dbus-internals.c: (_dbus_type_to_string):
2133 Add the types we didn't have.
2135 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2136 (_dbus_marshal_validate_arg):
2139 * dbus/dbus-message.c: (dbus_message_set_sender):
2140 Remove todo about being able to set sender to NULL.
2142 (dbus_message_set_is_error_reply),
2143 (dbus_message_get_is_error_reply):
2144 * dbus/dbus-message.h:
2147 * dbus/dbus-protocol.h:
2148 Add error reply flag.
2150 * test/data/valid-messages/opposite-endian.message:
2151 Add NIL type to test.
2153 2003-01-31 Havoc Pennington <hp@pobox.com>
2155 * doc/dbus-specification.sgml: fully specify the header. Add
2156 flags and major protocol version, and change header/body len to
2159 * dbus/dbus-message-builder.c (append_saved_length): append length
2162 * dbus/dbus-message.c (dbus_message_create_header): change header
2163 length and body length to unsigned. Add the new fields from the
2165 (_dbus_message_loader_return_buffer): unsigned header/body len
2167 2003-01-30 Havoc Pennington <hp@pobox.com>
2169 * dbus/dbus-auth.c: rework to use only REJECTED, no
2172 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2173 use REJECTED, suggested by Mark McLoughlin
2175 2003-01-30 Havoc Pennington <hp@pobox.com>
2177 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2178 a better way to report errors here. e.g. "unix address lacks
2179 path" or something. also "no such file" when the path doesn't
2182 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2184 (dbus_parse_address): add @todo about documenting address format,
2185 and allowing , and ; to be escaped
2187 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2190 Add dbus-address.[ch]
2192 * dbus/dbus-address.c: (dbus_address_entry_free),
2193 (dbus_address_entries_free), (create_entry),
2194 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2195 (dbus_parse_address), (_dbus_address_test):
2196 * dbus/dbus-address.h:
2197 New files for dealing with address parsing.
2199 * dbus/dbus-connection.c:
2200 Document timeout functions.
2202 * dbus/dbus-message.c:
2203 Document dbus_message_new_from_message.
2205 * dbus/dbus-server-debug.c:
2208 * dbus/dbus-server.c: (dbus_server_listen):
2209 Parse address and use correct server implementation.
2211 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2212 * dbus/dbus-string.h:
2213 New function with test.
2215 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2219 * dbus/dbus-transport-debug.c:
2222 * dbus/dbus-transport.c: (_dbus_transport_open):
2223 Parse address and use correct transport implementation.
2225 2003-01-30 Havoc Pennington <hp@pobox.com>
2227 * dbus/dbus-message.c: use message->byte_order instead of
2228 DBUS_COMPILER_BYTE_ORDER throughout.
2229 (dbus_message_create_header): pad header to align the
2230 start of the body of the message to 8-byte boundary
2232 * dbus/dbus-marshal.h: make all the demarshalers take const
2233 DBusString arguments.
2235 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2236 validate message args here, so we don't have to do slow validation
2237 later, and so we catch bad messages as they are incoming. Also add
2238 better checks on header_len and body_len. Also fill in
2241 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2242 implemented properly)
2243 (_dbus_string_validate_nul): new function to check all-nul
2245 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2246 get_arg_end_pos and remove all validation
2247 (_dbus_marshal_validate_arg): actually do validation here.
2249 2003-01-29 Havoc Pennington <hp@pobox.com>
2251 * dbus/dbus-message.c (check_message_handling): fix assertion
2252 failure on set_client_serial
2254 2003-01-28 Havoc Pennington <hp@pobox.com>
2256 * dbus/dbus-server-debug.c: Add doc section comments
2258 * dbus/dbus-transport-debug.c: add doc section comments
2260 2003-01-28 Havoc Pennington <hp@redhat.com>
2262 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2263 the reverse order from how I had it
2264 (_dbus_string_base64_encode): reverse encoding order. I was
2265 basically byteswapping everything during encoding.
2267 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2269 * dbus/dbus-connection-internal.h:
2270 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2271 (_dbus_connection_remove_timeout):
2272 Add functions for adding and removing timeouts.
2274 * dbus/dbus-message.c: (dbus_message_new_from_message):
2275 Add new function that takes a message and creates an exact
2276 copy of it, but with the refcount set to 1.
2277 (check_message_handling):
2280 * dbus/dbus-server-protected.h:
2281 * dbus/dbus-server.c: (_dbus_server_init_base),
2282 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2283 (dbus_server_set_timeout_functions):
2284 (_dbus_server_remove_timeout):
2285 New functions so that a server can add and remove timeouts.
2287 (dbus_server_listen):
2288 Add commented out call to dbus_server_debug_new.
2290 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2291 Actually set the handler, doh.
2293 * dbus/dbus-transport.c: (_dbus_transport_open):
2294 Add commented out call to dbus_transport_debug_client_new.
2297 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2299 2003-01-28 Havoc Pennington <hp@pobox.com>
2301 * dbus/dbus-message.c (check_message_handling): function to check
2302 on the loaded message, iterates over it etc.
2304 2003-01-28 Havoc Pennington <hp@pobox.com>
2306 * test/Makefile.am (dist-hook): fix make distdir
2308 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2310 2003-01-27 Havoc Pennington <hp@pobox.com>
2312 * dbus/dbus-mempool.c (time_for_size): replace printf with
2315 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2316 empty lines; fix the SAVE_LENGTH stuff to be
2317 START_LENGTH/END_LENGTH so it actually works; couple other
2320 * test/Makefile.am (dist-hook): add dist-hook for .message files
2322 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2323 can be constant or locked.
2324 (_dbus_string_free): allow freeing a const string as
2327 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2329 * dbus/dbus-test-main.c (main): take an argument which is the
2330 directory containing test data
2332 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2333 argument to this and load all the messages in test/data/
2334 checking that they can be loaded or not loaded as appropriate.
2336 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2338 * bus/dispatch.c: (bus_dispatch_message_handler):
2339 Dispatch messages sent to services.
2341 * bus/driver.c: (bus_driver_send_service_deleted),
2342 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2343 (bus_driver_send_service_acquired):
2344 Add helper functions for sending service related messages.
2346 (bus_driver_send_welcome_message):
2347 Send HELLO_REPLY instead of WELCOME.
2349 (bus_driver_handle_list_services):
2350 Send LIST_SERVICES_REPLY instead of SERVICES.
2352 (bus_driver_handle_own_service),
2353 (bus_driver_handle_service_exists):
2354 New message handlers.
2356 (bus_driver_handle_message):
2357 Invoke new message handlers.
2359 (bus_driver_remove_connection):
2360 Don't remove any services here since that's done automatically
2361 by bus_service_remove_owner now.
2364 New function signatures.
2366 * bus/services.c: (bus_service_add_owner):
2367 Send ServiceAcquired message if we're the only primary owner.
2369 (bus_service_remove_owner):
2370 Send ServiceAcquired/ServiceLost messages.
2372 (bus_service_set_prohibit_replacement),
2373 (bus_service_get_prohibit_replacement):
2374 Functions for setting prohibit replacement.
2376 (bus_service_has_owner):
2377 New function that checks if a connection is in the owner queue of
2381 Add new function signatures.
2383 * dbus/dbus-list.c: (_dbus_list_test):
2384 Add tests for _dbus_list_remove_last and traversing the list backwards.
2387 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2388 go any further, so return NULL then.
2390 * dbus/dbus-protocol.h:
2391 Add new messages, service flags and service replies.
2393 2003-01-26 Havoc Pennington <hp@pobox.com>
2395 * dbus/dbus-message-builder.c: implement, completely untested.
2397 * test/data/*: add data to be used in testing.
2398 ".message" files are our simple loadable text format.
2399 ".message-raw" will be binary dumps of messages.
2401 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2403 2003-01-26 Havoc Pennington <hp@pobox.com>
2405 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2407 * dbus/dbus-errors.c (dbus_result_to_string): add
2410 * dbus/dbus-message-builder.c: new file, will contain code to load
2411 up messages from files. Not implemented yet.
2413 2003-01-26 Havoc Pennington <hp@pobox.com>
2415 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2416 the sender by setting to NULL
2418 2003-01-26 Havoc Pennington <hp@pobox.com>
2420 The unit tests pass, but otherwise untested. If it breaks, the
2421 tests should have been better. ;-)
2423 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2426 * dbus/dbus-message.c: redo everything so we maintain
2427 message->header as the only copy of the various fields.
2428 This avoids the possibility of out-of-memory in some cases,
2429 for example dbus_message_lock() can't run out of memory anymore,
2430 and avoids extra copying. Figured I may as well go ahead and do
2431 this since it was busted for dbus_message_lock to not return
2432 failure on OOM, and dbus_message_write_header was totally
2433 unchecked for OOM. Also fixed some random other bugs.
2435 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2436 that strings are nul-terminated. Also, end_pos can be equal
2437 to string length just not greater than, I think.
2438 (_dbus_marshal_set_int32): new function
2439 (_dbus_marshal_set_uint32): new function
2440 (_dbus_marshal_set_string): new function
2442 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2443 a warning, init timeout_list to NULL
2444 (dbus_connection_send_message): don't use uninitialized variable
2447 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2449 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2451 * bus/driver.c: (bus_driver_handle_hello),
2452 (bus_driver_send_welcome_message):
2455 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2457 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2458 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2459 (dbus_connection_unref):
2460 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2461 * dbus/dbus-message.c: (dbus_message_unref),
2464 (dbus_message_get_fields):
2465 Remove debugging printout.
2467 (_dbus_message_loader_return_buffer):
2468 Don't store the header string.
2470 (_dbus_message_test):
2473 2003-01-26 Richard Hult <rhult@codefactory.se>
2475 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2476 the file descriptor list, since it can change under us.
2478 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2480 * glib/dbus-gmain.c: (dbus_connection_prepare),
2481 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2482 (remove_watch), (dbus_connection_hookup_with_g_main):
2483 Rewrite the glib handling to use its own GSource instead of a
2484 GIOChannel so we can catch messages put in the queue while waiting
2487 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2490 * bus/connection.c: (connection_disconnect_handler),
2491 (connection_watch_callback), (bus_connection_setup):
2492 * bus/dispatch.c: (send_one_message),
2493 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2494 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2496 * bus/driver.c: (bus_driver_send_service_deleted),
2497 (bus_driver_send_service_created), (bus_driver_handle_hello),
2498 (bus_driver_send_welcome_message),
2499 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2500 (bus_driver_handle_message):
2502 Refactor code, put the message dispatching in its own file. Use
2503 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2506 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2508 * dbus/dbus-internals.h:
2509 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2511 * dbus/dbus-message.c: (dbus_message_get_sender):
2512 * dbus/dbus-message.h:
2513 Implement dbus_message_get_sender.
2515 * dbus/dbus-protocol.h:
2516 Add message and service defines.
2518 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2520 * dbus/dbus-connection.c: (dbus_connection_send_message):
2521 * dbus/dbus-message-internal.h:
2522 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2523 (dbus_message_write_header):
2524 Remove _dbus_messag_unlock and don't set the client serial on a
2525 message if one already exists.
2527 2003-01-24 Havoc Pennington <hp@pobox.com>
2529 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2532 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2535 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2537 * dbus/dbus-list.c: (alloc_link), (free_link):
2538 Use a memory pool for the links.
2540 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2542 * bus/connection.c: (bus_connection_foreach):
2544 Add new bus_connection_foreach function.
2546 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2547 Add function that broadcasts a message to all clients.
2549 (bus_driver_send_service_created), (bus_driver_handle_hello),
2550 (bus_driver_send_welcome_message),
2551 (bus_driver_handle_list_services), (bus_driver_message_handler):
2552 Implement functions that take care of listing services, and notifying
2553 clients when new services are created.
2555 * bus/services.c: (bus_services_list):
2557 Add new function that returns an array of strings with the currently
2558 registered services.
2561 * glib/dbus-gmain.c:
2562 Update copyright year.
2564 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2566 * dbus/dbus-connection.c: (dbus_connection_send_message):
2567 Unlock the message in case it was sent earlier.
2569 (dbus_connection_send_message_with_reply_and_block):
2570 Remove the reply message from the list.
2572 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2573 Set array_len and new_pos correctly.
2575 (_dbus_marshal_test):
2576 Remove debug output.
2578 * dbus/dbus-message-internal.h:
2579 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2580 New function that returns the reply serial.
2582 (_dbus_message_unlock):
2583 New function that unlocks a message and resets its header.
2585 (dbus_message_append_string_array),
2586 (dbus_message_get_fields_valist),
2587 (dbus_message_iter_get_field_type),
2588 (dbus_message_iter_get_string_array),
2589 (dbus_message_get_fields),
2590 (dbus_message_append_fields_valist):
2591 Handle string arrays.
2593 (dbus_message_set_sender):
2594 Make this function public since the bus daemon needs it.
2596 (decode_header_data):
2597 Set the reply serial to -1 initially.
2599 * dbus/dbus-message.h:
2600 Add dbus_message_set_sender.
2602 2003-01-24 Havoc Pennington <hp@pobox.com>
2604 * doc/dbus-specification.sgml: add some stuff
2606 2003-01-22 Havoc Pennington <hp@pobox.com>
2608 * doc/dbus-specification.sgml: Start to document the protocol.
2610 2003-01-22 Havoc Pennington <hp@pobox.com>
2612 * dbus/dbus-connection.c
2613 (dbus_connection_send_message_with_reply_and_block): add some @todo
2615 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2617 2003-01-21 Havoc Pennington <hp@pobox.com>
2619 (patch untested because can't compile)
2621 * bus/driver.c (create_unique_client_name): make this function
2622 never recycle client names. Also, caller should initialize
2625 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2627 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2629 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2630 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2631 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2632 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2633 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2634 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2635 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2636 * dbus/dbus-marshal.h:
2637 * dbus/dbus-protocol.h:
2638 Add support for marshalling and demarshalling integer, double
2641 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2646 * bus/connection.c: (connection_disconnect_handler):
2647 Remove the connection from the bus driver's list.
2649 (connection_watch_callback): Dispatch messages.
2651 (free_connection_data): Free connection name.
2653 (bus_connection_setup): Add connection to the bus driver's list.
2654 (bus_connection_remove_owned_service):
2655 (bus_connection_set_name), (bus_connection_get_name):
2656 Add functions for setting and getting the connection's name.
2659 Add function headers.
2661 * bus/driver.c: (create_unique_client_name),
2662 (bus_driver_handle_hello_message),
2663 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2664 (bus_driver_add_connection), (bus_driver_remove_connection):
2667 * bus/services.c: (bus_service_free):
2669 New file that handles communication and registreation with the bus
2672 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2674 * dbus/dbus-connection.c: (dbus_connection_send_message):
2675 Add a new client_serial parameter.
2677 (dbus_connection_send_message_with_reply):
2678 Remove a @todo since we've implemented the blocking function.
2680 (dbus_connection_send_message_with_reply_and_block):
2681 New function that sends a message and waits for a reply and
2682 then returns the reply.
2684 * dbus/dbus-connection.h:
2687 * dbus/dbus-errors.c: (dbus_result_to_string):
2688 * dbus/dbus-errors.h:
2689 Add new DBUS_RESULT.
2691 * dbus/dbus-message-internal.h:
2692 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2693 (_dbus_message_set_sender), (dbus_message_write_header),
2694 (dbus_message_new_reply), (decode_header_data),
2695 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2696 * dbus/dbus-message.h:
2697 Add new functions that set the reply serial and sender.
2698 Also marshal and demarshal them correctly and add test.
2700 * dbus/dbus-protocol.h:
2701 Add new DBUS_MESSAGE_TYPE_SENDER.
2704 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2705 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2706 (dbus_connection_hookup_with_g_main):
2707 * glib/test-dbus-glib.c: (main):
2708 Rewrite to use GIOChannel and remove the GSource crack.
2710 * test/echo-client.c: (main):
2711 * test/watch.c: (check_messages):
2712 Update for changed APIs
2714 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2716 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2718 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2719 Create a DBusTimeoutList.
2720 (dbus_connection_set_timeout_functions): Add new function to
2721 set timeout callbacks
2723 * dbus/dbus-connection.h: Add public DBusTimeout API.
2725 * dbus/dbus-message.c: (dbus_message_get_service):
2726 * dbus/dbus-message.h: New function.
2728 * dbus/dbus-server.c: Fix small doc typo.
2730 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2732 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2734 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2735 of the string, just as long as specified.
2737 2003-01-19 Havoc Pennington <hp@pobox.com>
2739 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2742 * dbus/dbus-server.c (dbus_server_set_max_connections)
2743 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2744 keep track of current number of connections, and add API for
2745 setting a max (but haven't implemented enforcing the max yet)
2747 2003-01-18 Havoc Pennington <hp@pobox.com>
2749 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2750 reading/writing if read_watch != NULL or write_watch != NULL.
2752 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2753 the message loader code to actually load message->header and
2754 message->body into the newly-created message.
2756 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2759 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2760 (dbus_connection_get_max_message_size)
2761 (dbus_connection_set_max_live_messages_size)
2762 (dbus_connection_get_max_live_messages_size): implement some
2763 resource limitation functions
2765 * dbus/dbus-resources.c: new file implementing some of the
2766 resource limits stuff
2768 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2769 missing docs, add @todo to handle OOM etc.
2771 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2774 2003-01-18 Havoc Pennington <hp@pobox.com>
2776 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2777 connection if it hasn't been already.
2779 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2780 replace with DisconnectFunction.
2782 2003-01-18 Havoc Pennington <hp@pobox.com>
2784 Building --disable-verbose-mode --disable-asserts --disable-tests
2785 cuts the library from 112K to 45K or so
2787 * configure.in: check for varargs macro support,
2788 add --enable-verbose-mode, --enable-asserts.
2790 * dbus/dbus-internals.h (_dbus_assert): support
2792 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2794 2003-01-18 Havoc Pennington <hp@pobox.com>
2796 * dbus/dbus-test.c: include config.h so that tests actually run
2798 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2799 so the failure mode when that assumption fails will be plenty
2802 2003-01-18 Havoc Pennington <hp@pobox.com>
2804 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2806 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2809 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2810 since we don't want to use those in make check
2812 2003-01-15 Havoc Pennington <hp@redhat.com>
2818 2003-01-15 Havoc Pennington <hp@redhat.com>
2820 * test/Makefile.am: fix so that test source code ends up in the
2821 distribution on make distcheck
2823 2003-01-15 Havoc Pennington <hp@redhat.com>
2829 2003-01-15 Havoc Pennington <hp@redhat.com>
2831 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2832 fix build when --disable-tests
2834 * Makefile.am (EXTRA_DIST): put HACKING in here
2836 * HACKING: document procedure for making a tarball release.
2838 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2840 * bus/connection.c: (connection_error_handler),
2841 (bus_connection_setup):
2842 * bus/main.c: (main):
2843 Make sure that the DBusConnectionData struct is NULLed
2844 out to prevent a segfault.
2846 * dbus/dbus-errors.c: (dbus_result_to_string):
2847 * dbus/dbus-errors.h:
2848 * dbus/dbus-message.c: (dbus_message_get_fields),
2849 (dbus_message_get_fields_valist), (_dbus_message_test):
2850 * dbus/dbus-message.h:
2851 Make dbus_message_get_fields return a result code so we can
2852 track invalid fields as well as oom.
2854 2003-01-11 Havoc Pennington <hp@pobox.com>
2856 * configure.in: change --enable-test/--enable-ansi action-if-given
2857 to enable_foo=$enableval instead of enable_foo=yes
2859 2003-01-08 Havoc Pennington <hp@pobox.com>
2861 * dbus/dbus-string.c (_dbus_string_align_length): new function
2863 * dbus/dbus-test-main.c: move main() for test app here
2865 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2866 symbol to run tests, because dbus-test isn't in the main
2869 Code review nitpicks.
2871 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2872 for people with narrow emacs ;-). Assert client_serial was filled
2873 in. Assert message->name != NULL.
2874 (dbus_message_append_fields): have "first_field_type" arg separate
2875 from va list, needed for C++ binding that also uses varargs IIRC
2876 and helps with type safety
2877 (dbus_message_new): add @todo about using DBusString to store
2878 service/name internally
2879 (dbus_message_new): don't leak ->service and ->name on OOM later
2881 (dbus_message_unref): free the service name
2882 (dbus_message_get_fields): same change to varargs
2883 i.e. first_field_type
2884 (_dbus_message_loader_return_buffer): assert that the message data
2885 is aligned (if not it's a bug in our code). Put in verbose griping
2886 about why we set corrupted = TRUE.
2887 (decode_header_data): add FIXME that char* is evil. Was going to
2888 add FIXME about evil locale-specific string.h strncmp, but just
2889 switched to wacky string-as-uint32 optimization. Move check for
2890 "no room for field name" above get_const_data_len() to avoid
2891 assertion failure in get_const_data_len if we have trailing 2
2892 bytes or the like. Check for service and name fields being
2893 provided twice. Don't leak service/name on error. Require field
2894 names to be aligned to 4 bytes.
2896 * dbus/dbus-marshal.c: move byte swap stuff to header
2897 (_dbus_pack_int32): uscore-prefix
2898 (_dbus_unpack_int32): uscore-prefix
2899 (_dbus_unpack_uint32): export
2900 (_dbus_demarshal_string): add @todo complaining about use of
2902 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2903 handling allowing corrupt data to go unchecked
2905 2003-01-08 Havoc Pennington <hp@redhat.com>
2907 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2908 to the select() as needed for authentication. (should be using
2909 _dbus_poll() not select, but for another day)
2911 * dbus/dbus.h: include dbus/dbus-protocol.h
2913 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2915 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2918 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2920 * dbus/dbus-internals.c: (_dbus_type_to_string):
2921 New function that returns a string describing a type.
2923 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2924 * dbus/dbus-marshal.h:
2925 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2926 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2927 (dbus_message_iter_get_byte_array):
2928 * dbus/dbus-message.h:
2929 Add new convenience functions for appending and getting message fields.
2930 Also add demarshalling routines for byte arrays.
2932 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2934 * dbus/dbus-connection-internal.h:
2935 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2936 (_dbus_connection_get_next_client_serial),
2937 (dbus_connection_send_message):
2938 * dbus/dbus-internals.h:
2939 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2940 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2941 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2942 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2943 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2944 (_dbus_verbose_bytes), (_dbus_marshal_test):
2945 * dbus/dbus-marshal.h:
2946 * dbus/dbus-message-internal.h:
2947 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2948 (dbus_message_write_header), (_dbus_message_lock),
2949 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2950 (dbus_message_get_name), (dbus_message_append_int32),
2951 (dbus_message_append_uint32), (dbus_message_append_double),
2952 (dbus_message_append_string), (dbus_message_append_byte_array),
2953 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2954 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2955 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2956 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2957 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2958 (decode_header_data), (_dbus_message_loader_return_buffer),
2959 (message_iter_test), (_dbus_message_test):
2960 * dbus/dbus-message.h:
2961 * dbus/dbus-protocol.h:
2962 * dbus/dbus-test.c: (main):
2964 * glib/test-dbus-glib.c: (message_handler), (main):
2965 * test/echo-client.c: (main):
2966 * test/watch.c: (check_messages):
2967 Make messages sendable and receivable for real.
2969 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2971 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2972 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2973 * dbus/dbus-message.c: (dbus_message_append_int32),
2974 (dbus_message_append_uint32), (dbus_message_append_double),
2975 (dbus_message_append_string), (dbus_message_append_byte_array):
2976 Handle OOM restoration.
2978 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2980 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2981 (_dbus_demarshal_string), (_dbus_marshal_test):
2982 * dbus/dbus-marshal.h:
2983 * dbus/dbus-message.c: (dbus_message_get_name),
2984 Document these functions.
2986 (dbus_message_append_int32), (dbus_message_append_uint32),
2987 (dbus_message_append_double), (dbus_message_append_string),
2988 (dbus_message_append_byte_array):
2989 * dbus/dbus-message.h:
2990 Add functions for adding message fields of different types.
2992 * dbus/dbus-protocol.h:
2993 Add the different types.
2995 2003-01-05 Havoc Pennington <hp@pobox.com>
2997 * bus/connection.c: implement routines for handling connections,
2998 first thing is keeping a list of owned services on each connection
2999 and setting up watches etc.
3001 * bus/services.c: implement a mapping from service names to lists
3004 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3006 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3007 to use static mutexes for global data
3009 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3010 collection of functions to set/get application-specific data
3011 on the DBusConnection.
3013 2003-01-04 Havoc Pennington <hp@pobox.com>
3015 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3016 (_dbus_poll): new function
3018 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3021 * bus/loop.c: initial code for the daemon main loop
3023 2003-01-04 Havoc Pennington <hp@pobox.com>
3025 * test/watch.c (error_handler): make it safe if the error handler
3026 is called multiple times (if we s/error handler/disconnect
3027 handler/ we should just guarantee it's called only once)
3029 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3030 error handler on disconnect (it's quite possible we should
3031 just change the error handler to a "disconnect handler," I'm
3032 not sure we have any other meaningful errors)
3034 * configure.in: check for getpwnam_r
3036 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3037 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3038 mechanism as in SASL spec, using socket credentials
3040 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3041 (_dbus_send_credentials_unix_socket): new function
3043 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3045 (_dbus_write): only check errno if <0 returned
3046 (_dbus_write_two): ditto
3048 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3050 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3051 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3052 (_dbus_marshal_test):
3053 * dbus/dbus-marshal.h:
3054 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3055 to _dbus_marshal_utf8_string. Also fix some tests.
3057 2002-12-28 Harri Porten <porten@kde.org>
3059 * configure.in: added check for C++ compiler and a very cheesy
3060 check for the Qt integration
3062 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3064 * qt/Makefile.am: added
3066 * qt/.cvsignore: added
3068 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3069 latter, added #ifdef QT_THREAD_SUPPORT guard.
3071 * dbus/Makefile.am: added missing headers for make dist
3073 2002-12-28 Kristian Rietveld <kris@gtk.org>
3075 * dbus/Makefile.am: fixup export-symbols-regex.
3077 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3079 * acinclude.m4: Add this file and put the
3080 PKG_CHECK_MODULE macro in it.
3082 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3084 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3085 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3086 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3087 (_dbus_marshal_test):
3088 Make the demarshalling routines align the pos argument.
3089 Add string marshalling tests and fix the obvious bugs
3092 2002-12-26 Havoc Pennington <hp@pobox.com>
3094 * dbus/dbus-auth.c: fixes fixes fixes
3096 * dbus/dbus-transport-unix.c: wire up support for
3097 encoding/decoding data on the wire
3099 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3100 (_dbus_auth_decode_data): append to target string
3101 instead of nuking it.
3103 2002-12-26 Havoc Pennington <hp@pobox.com>
3105 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3106 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3109 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3110 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3111 now). Main point is because I wanted unpack_uint32 to implement
3113 (_dbus_verbose_bytes): new function
3115 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3117 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3118 mechanism to handle a corrupt message stream
3119 (_dbus_message_loader_new): fix preallocation to only prealloc,
3122 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3123 (_dbus_string_test): enhance tests for copy/move and fix the
3126 * dbus/dbus-transport-unix.c: Hold references in more places to
3127 avoid reentrancy problems
3129 * dbus/dbus-transport.c: ditto
3131 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3132 leak reference count in no-message case
3134 * test/watch.c (do_mainloop): handle adding/removing watches
3135 during iteration over the watches. Also, ref the connection/server
3136 stored on a watch, so we don't try to mangle a destroyed one.
3138 * dbus/dbus-transport-unix.c (do_authentication): perform
3141 * dbus/dbus-auth.c (get_state): add a state
3142 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3143 (_dbus_auth_get_unused_bytes): append the unused bytes
3144 to the passed in string, rather than prepend
3146 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3147 the auth conversation DBusAuth
3149 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3150 (_dbus_transport_new_for_domain_socket): when creating a
3151 transport, pass in whether it's a client-side or server-side
3152 transport so we know which DBusAuth to create
3154 2002-12-03 Havoc Pennington <hp@pobox.com>
3156 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3157 _after_ finalizing the derived members
3158 (unix_connection_set): unref watch if we fail to add it
3160 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3161 transport first, so that the connection owned by the
3162 transport will be valid as the transport finalizes.
3164 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3165 if necessary, and remove watches from the connection.
3167 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3169 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3171 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3172 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3173 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3174 (_dbus_marshal_test):
3175 * dbus/dbus-marshal.h:
3176 Add string marshal functions and have the demarshal functions
3177 return the new position.
3179 2002-12-25 Havoc Pennington <hp@pobox.com>
3181 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3182 it is a simple protocol that just maps directly to SASL.
3184 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3185 initial implementation, not actually used yet.
3187 * dbus/dbus-string.c (_dbus_string_find): new function
3188 (_dbus_string_equal): new function
3189 (_dbus_string_base64_encode): new function
3190 (_dbus_string_base64_decode): new function
3192 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3195 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3196 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3197 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3198 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3199 * dbus/dbus-marshal.h:
3200 * dbus/dbus-protocol.h:
3201 * dbus/dbus-test.c: (main):
3203 Add un-optimized marshalling/demarshalling routines.
3205 2002-12-25 Harri Porten <porten@kde.org>
3207 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3209 2002-12-24 Zack Rusin <zack@kde.org>
3211 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3212 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3215 2002-12-24 Havoc Pennington <hp@pobox.com>
3217 * glib/dbus-gthread.c: fix include
3219 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3220 I think glib API needs to change, though, as you don't
3221 want to use DBusMessageFunction, you want to use the
3222 DBusMessageHandler object. Probably
3223 dbus_connection_open_with_g_main_loop()
3224 and dbus_connection_setup_g_main_loop() or something like that
3225 (but think of better names...) that just create a connection
3226 that has watch/timeout functions etc. already set up.
3228 * dbus/dbus-connection.c
3229 (dbus_connection_send_message_with_reply): new function just to
3230 show how the message handler helps us deal with replies.
3232 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3234 * dbus/dbus-string.c (_dbus_string_test): free a string that
3237 * dbus/dbus-hash.c: use memory pools for the hash entries
3238 (rebuild_table): be more paranoid about overflow, and
3239 shrink table when we can
3240 (_dbus_hash_test): reduce number of sprintfs and write
3241 valid C89. Add tests for case where we grow and then
3242 shrink the hash table.
3244 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3246 * dbus/dbus-connection.c (dbus_connection_register_handler)
3247 (dbus_connection_unregister_handler): new functions
3249 * dbus/dbus-message.c (dbus_message_get_name): new
3251 * dbus/dbus-list.c: fix docs typo
3253 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3254 an object representing a handler for messages.
3256 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3259 * glib/dbus-gthread.c: (dbus_gthread_init):
3260 Don't use the gdbus prefix for public functions.
3262 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3266 Add GLib checks and fixup .pc files
3270 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3271 (gdbus_connection_check), (gdbus_connection_dispatch),
3272 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3273 (dbus_connection_gsource_new):
3274 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3275 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3276 * glib/test-dbus-glib.c: (message_handler), (main):
3279 2002-12-15 Harri Porten <porten@kde.org>
3281 * autogen.sh: check for libtoolize before attempting to use it
3283 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3286 * .cvsignore: ignore more stamp files
3288 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3290 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3291 without make install.
3293 2002-12-15 Havoc Pennington <hp@pobox.com>
3295 * dbus/dbus-threads.c: add thread stubs that a higher library
3296 layer can fill in. e.g. the GLib wrapper might fill them in with
3297 GThread stuff. We still need to use this thread API to
3298 thread-safe-ize the library.
3300 2002-12-12 Havoc Pennington <hp@pobox.com>
3302 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3303 below new interfaces and include fewer system headers.
3305 * dbus/dbus-sysdeps.c (_dbus_read): new function
3306 (_dbus_write): new function
3307 (_dbus_write_two): new function
3308 (_dbus_connect_unix_socket): new function
3309 (_dbus_listen_unix_socket): new function
3311 * dbus/dbus-message-internal.h: change interfaces to use
3314 2002-12-11 Havoc Pennington <hp@pobox.com>
3316 * dbus/dbus-types.h: add dbus_unichar
3318 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3320 * dbus/dbus-connection.c (dbus_connection_send_message): return
3323 * dbus/dbus-transport.c: include dbus-watch.h
3325 * dbus/dbus-connection.c: include dbus-message-internal.h
3327 * HACKING: add file with coding guidelines stuff.
3329 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3330 handling here, for security purposes (as in vsftpd). Not actually
3331 using this class yet.
3333 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3334 system/libc usage here, as in vsftpd, for ease of auditing (and
3335 should also simplify portability). Haven't actually moved all the
3336 system/libc usage into here yet.
3338 2002-11-25 Havoc Pennington <hp@pobox.com>
3340 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3341 always print the first verbose message.
3343 2002-11-24 Havoc Pennington <hp@pobox.com>
3345 * test/echo-client.c, test/echo-server.c: cheesy test
3348 * configure.in (AC_CHECK_FUNCS): check for writev
3350 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3353 * dbus/dbus-list.c (_dbus_list_foreach): new function
3355 * dbus/dbus-internals.c (_dbus_verbose): new function
3357 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3358 representing a server that listens for connections.
3360 * dbus/.cvsignore: create
3362 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3363 public API for reporting errors
3365 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3366 public object representing a connection that
3367 sends/receives messages. (Same object used for
3368 both client and server.)
3370 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3371 Basic abstraction for different kinds of stream
3372 that we might read/write messages from.
3374 2002-11-23 Havoc Pennington <hp@pobox.com>
3376 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3379 * dbus/dbus-test.c (main): add list test, and include
3380 dbus-test.h as intended
3382 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3383 (_dbus_hash_table_remove_int): return value indicates
3384 whether the entry existed to remove
3386 * dbus/dbus-list.c: add linked list utility class,
3389 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3392 2002-11-23 Havoc Pennington <hp@pobox.com>
3394 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3395 DBUS_END_DECLS to nothing, that should fix this once and for all
3397 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3399 * dbus/dbus-message.c, dbus/dbus-hash.c:
3400 add some missing @brief
3402 2002-11-23 Havoc Pennington <hp@pobox.com>
3404 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3405 to avoid confusing Doxygen
3407 * dbus/dbus-hash.c: @} not }@
3409 * dbus/dbus-message.c (struct DBusMessage): split out
3412 2002-11-23 Havoc Pennington <hp@pobox.com>
3414 * configure.in: pile on more warning flags if using gcc
3416 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3417 to document static functions
3419 * configure.in: add summary to end of configure so it
3420 looks nice and attractive
3422 * dbus/dbus-hash.c: finish implementation and write unit
3425 * configure.in: add --enable-tests to enable unit tests
3427 * dbus/dbus-test.c: test program to run unit tests
3428 for all files in dbus/*, initially runs a test for
3431 * dbus/dbus-internals.h: file to hold some internal utility stuff
3433 2002-11-22 Havoc Pennington <hp@redhat.com>
3435 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3436 "ported" away from Tcl
3438 * dbus/dbus-types.h: header for types such as dbus_bool_t
3440 2002-11-22 Havoc Pennington <hp@redhat.com>
3442 * dbus/dbus.h: fixups for doc warnings
3444 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3446 (QUIET): make it quiet so we can see warnings
3448 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3450 2002-11-22 Havoc Pennington <hp@redhat.com>
3452 * Makefile.am: include "Doxyfile" target in all-local
3454 * configure.in: generate the Doxyfile
3456 * Doxyfile.in: move Doxyfile here, so we can use
3457 configure to generate a Doxyfile with the right
3460 2002-11-22 Havoc Pennington <hp@redhat.com>
3462 * dbus/dbus-message.c: move inline docs into .c file
3464 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3465 so all docs are under doc/
3466 (MAN_EXTENSION): generate man pages. Use extension
3467 ".3dbus" which matches ".3qt" on my system,
3468 I guess this is OK, I don't know really.
3469 (FILE_PATTERNS): look for .c files not .h, makes sense
3472 2002-11-22 Havoc Pennington <hp@pobox.com>
3474 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3475 because any app can be a server, and any app can be a client,
3476 the bus is a special kind of server.
3478 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3480 * Doxyfile : adding. Still needs Makefile rules to be generated
3481 automatically (just run "doxygen" in the toplevel dir for now to
3484 * dbus/dbus-message.h : Adding sample docs (javadoc since
3485 resembles gtk-doc a little more)
3487 * dbus/dbus.h : Adding sample docs
3489 2002-11-21 Havoc Pennington <hp@redhat.com>
3491 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3492 so we can allow ourselves to include files directly,
3493 instead of having to use dbus.h
3495 * dbus/dbus.h: fill in
3497 * dbus/dbus-message.h: sketch out a sample header file.
3498 Include griping if you include it directly instead of
3501 * dbus/dbus-macros.h: new file with macros for extern "C",
3502 TRUE/FALSE, NULL, etc.
3504 * doc/file-boilerplate.c: put include guards in here
3506 2002-11-21 Havoc Pennington <hp@redhat.com>
3508 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3510 * COPYING: include the GPL as well, and license code
3511 under both AFL and GPL.
3513 2002-11-21 Havoc Pennington <hp@redhat.com>
3515 * acconfig.h: get rid of this
3517 * autogen.sh (run_configure): add --no-configure option
3519 * configure.in: remove AC_ARG_PROGRAM to make
3520 autoconf complain less. add AC_PREREQ.
3521 add AC_DEFINE third arg.
3523 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3526 Fix references so we can distcheck.
3528 2002-11-21 Havoc Pennington <hp@redhat.com>
3530 * Initial module creation