1 2005-01-16 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-internals.c (_dbus_real_assert): print the function
4 name the assertion failed in
6 * dbus/dbus-internals.h (_dbus_return_if_fail)
7 (_dbus_return_val_if_fail): assert that the name of the function
8 containing the check doesn't start with '_', since we only want to
9 use checks on public functions
11 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
14 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
15 change checks to asserts for private function
17 * dbus/dbus-message.c (_dbus_message_set_serial): checks
18 to asserts for private function
20 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
21 broken assertion that was breaking make check
22 (_dbus_type_reader_array_is_empty): remove this rather than fix
23 it, was only used in assertions
25 2005-01-16 Havoc Pennington <hp@redhat.com>
27 * test/unused-code-gc.py: hacky script to find code that's used
28 only by the bus (not libdbus) or used only by tests or not used at
29 all. It has some false alarms, but looks like we can clean up a
30 lot of size from libdbus.
32 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
33 dbus/Makefile.am: initially move 10K of binary size out of libdbus
35 2005-01-16 Havoc Pennington <hp@redhat.com>
37 * Add and fix docs according to Doxygen warnings throughout
40 * dbus/dbus-marshal-recursive.c
41 (_dbus_type_reader_array_is_empty): change this to just call
42 array_reader_get_array_len() and make it static
44 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
46 (dbus_message_iter_init_append): rename from append_iter_init
48 * dbus/dbus-marshal-recursive.c
49 (_dbus_type_reader_get_element_type): rename from
50 _dbus_type_reader_get_array_type
52 2005-01-15 Havoc Pennington <hp@redhat.com>
54 * test/glib/test-profile.c (with_bus_server_filter): fix crash
56 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
57 when DBUS_DISABLE_ASSERT
58 (_dbus_marshal_set_basic): be sure we align for the string length
60 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
63 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
65 (_dbus_string_set_byte): provide inline macro version
67 2005-01-15 Havoc Pennington <hp@redhat.com>
69 * Land the new message args API and type system.
71 This patch is huge, but the public API change is not
72 really large. The set of D-BUS types has changed somewhat,
73 and the arg "getters" are more geared toward language bindings;
74 they don't make a copy, etc.
76 There are also some known issues. See these emails for details
78 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
79 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
81 * dbus/dbus-marshal-*: all the new stuff
83 * dbus/dbus-message.c: basically rewritten
85 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
86 freed blocks to be all non-nul bytes so using freed memory is less
89 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
90 DBUS_FAIL_MALLOC=N environment variable, so you can do
91 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
92 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
95 * qt/message.cpp: port to the new message args API
96 (operator<<): use str.utf8() rather than str.unicode()
97 (pretty sure this is right from the Qt docs?)
99 * glib/dbus-gvalue.c: port to the new message args API
101 * bus/dispatch.c, bus/driver.c: port to the new message args API
103 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
104 "locked" flag to TRUE and align_offset to 0; I guess we never
105 looked at these anyhow, but seems cleaner.
107 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
108 move allocation padding macro to this header; use it to implement
109 (_DBUS_STRING_STATIC): ability to declare a static string.
111 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
112 change to return TRUE if the interface is not set.
114 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
115 to dbus-marshal-validate.[hc]
117 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
120 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
121 to dbus-marshal-*.[hc]
123 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
124 function here from dbus-marshal.c
126 2005-01-12 Joe Shaw <joeshaw@novell.com>
128 * NEWS: Update for 0.23.
130 * configure.in: Release 0.23.
132 2005-01-12 Joe Shaw <joeshaw@novell.com>
134 * mono/Makefile.am, mono/example/Makefile.am: Always build the
135 dbus DLL with --debug. Clean up after the .mdb files this leaves
138 * mono/doc/Makefile.am: Need to uninstall the docs on "make
141 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
142 is an enum, get the enum's underlying type. Another mono
145 2005-01-11 Joe Shaw <joeshaw@novell.com>
147 Patch from Sjoerd Simons <sjoerd@luon.net>
149 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
150 DESTDIR. It breaks stuff.
152 2005-01-11 Joe Shaw <joeshaw@novell.com>
154 Patch from Tambet Ingo <tambet@ximian.com>
156 * mono/DBusType/Array.cs (Get): Get the underlying element type by
157 calling type.GetElementType(). The code previously depended on
158 broken Mono behavior, which was fixed in Mono 1.1.3.
160 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
161 Activator.CreateInstance() so that the class's constructor is
162 called with the right parameters.
164 2005-01-11 Joe Shaw <joeshaw@novell.com>
166 Patch from Timo Teräs <ext-timo.teras@nokia.com>
168 * dbus/dbus-connection.c
169 (_dbus_connection_queue_received_message_link): Call
170 _dbus_connection_remove_timeout() instead of the _locked()
171 variant, since it's always called from
172 _dbus_connection_handle_watch(), which handles the locking.
173 Removed the _locked() variant since it's no longer used.
175 2005-01-03 Havoc Pennington <hp@redhat.com>
177 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
180 2004-12-26 Havoc Pennington <hp@redhat.com>
182 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
184 2005-01-03 Havoc Pennington <hp@redhat.com>
186 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
189 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
191 2005-01-02 Havoc Pennington <hp@redhat.com>
193 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
195 2005-01-01 Havoc Pennington <hp@redhat.com>
197 * configure.in: add -Wfloat-equal
199 2005-01-01 Havoc Pennington <hp@redhat.com>
201 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
202 for a variety of reasons '==' doesn't do this.
204 2004-12-31 Havoc Pennington <hp@redhat.com>
206 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
209 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
211 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
213 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
215 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
216 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
217 dbus-protocol.h. Because they are defines and not enums they are not
220 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
222 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
223 dbus_bus_activate_service
225 * python/dbus.py (Bus.activate_service): activate a service on the
228 2004-12-24 Havoc Pennington <hp@redhat.com>
230 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
231 file format has also changed and I haven't adapted to that yet
233 * Makefile.am: load .gcno files from latest gcc
235 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
236 * Patch from Rob Taylor <robtaylor@fastmail.fm>
238 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
241 * python/dbus.py (get_unix_user): Added binding to
242 call dbus_bindings.bus_get_unix_user
244 * python/extract.py: Modified the proto_pat regex to
247 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
249 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
250 better POSIX compliance.
252 2004-12-19 Havoc Pennington <hp@redhat.com>
254 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
255 (_dbus_string_insert_8_aligned): new functions
257 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
259 2004-12-18 Havoc Pennington <hp@redhat.com>
261 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
264 * dbus/dbus-message.c: fix a comment, and add a still-unused
265 not-implemented function
267 * dbus/dbus-marshal.h: fix comment
269 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
271 2004-12-17 Joe Shaw <joeshaw@novell.com>
273 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
274 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
275 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
276 Type.UnderlyingSystemType to get the actual system type
277 underneath. This code previously depended on the broken Mono
278 behavior, which was fixed in 1.1.3.
280 2004-11-27 Havoc Pennington <hp@redhat.com>
282 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
284 (_dbus_string_get_const_data): inline when asserts are disabled
286 * dbus/dbus-message.c: record the _dbus_current_generation of
287 creation so we can complain if dbus_shutdown() is used improperly.
288 Do this only if checks are enabled.
290 * dbus/dbus-connection.c: ditto
292 2004-11-26 Havoc Pennington <hp@redhat.com>
294 * test/glib/test-profile.c: add with_bus mode to profile echoes
295 that go through the bus.
297 * test/glib/run-test.sh: add ability to run test-profile
299 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
302 2004-11-26 Havoc Pennington <hp@redhat.com>
304 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
305 thing was implemented
307 2004-11-26 Havoc Pennington <hp@redhat.com>
309 * test/glib/test-profile.c: tweak a bit, add support for some
310 made-up minimal malloc overhead with plain sockets, since in
311 real life some sort of buffers are unavoidable thus we could
312 count them in the theoretical best case
314 2004-11-26 Havoc Pennington <hp@redhat.com>
316 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
317 where I was trying to cache one too many messages
319 2004-11-26 Havoc Pennington <hp@redhat.com>
321 * dbus/dbus-message.c: reimplement message cache as an array which
322 makes the cache about twice as fast and saves maybe 1.5% overall
324 2004-11-26 Havoc Pennington <hp@redhat.com>
326 * dbus/dbus-threads.c (init_global_locks): forgot to put the
327 message cache lock here
329 2004-11-26 Havoc Pennington <hp@redhat.com>
331 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
332 the "char byte_order" next to each other to save 4 bytes
333 (dbus_message_new_empty_header): reduce preallocation, since the
334 message cache should achieve a similar effect
335 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
336 message cache that keeps a few DBusMessage around in a pool,
337 another 8% speedup or so.
339 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
341 2004-11-25 Havoc Pennington <hp@redhat.com>
343 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
344 to write, without reading or blocking, try it before the poll()
345 and skip the poll() if nothing remains to write. This is about a
346 3% speedup in the echo client/server
348 2004-11-25 Havoc Pennington <hp@redhat.com>
350 The primary change here is to always write() once before adding
351 the write watch, which gives us about a 10% performance increase.
353 * dbus/dbus-transport-unix.c: a number of modifications to cope
354 with removing messages_pending
355 (check_write_watch): properly handle
356 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
357 messages_pending stuff
358 (check_read_watch): properly handle WAITING_FOR_MEMORY and
360 (unix_handle_watch): after writing, see if the write watch can be
362 (unix_do_iteration): assert that write_watch/read_watch are
363 non-NULL rather than testing that they aren't, since they
364 aren't allowed to be NULL. check_write_watch() at the end so
365 we add the watch if we did not finish writing (e.g. got EAGAIN)
367 * dbus/dbus-transport-protected.h: remove messages_pending call,
368 since it resulted in too much inefficient watch adding/removing;
369 instead we now require that the transport user does an iteration
370 after queueing outgoing messages, and after trying the first
371 write() we add a write watch if we got EAGAIN or exceeded our
372 max bytes to write per iteration setting
374 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
377 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
378 freed and then accessed, valgrind flagged this bug, fix it
380 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
381 as the last valid field plus 1, where really it is equal to the
382 last valid field. Corrects some message corruption issues.
384 * dbus/dbus-mainloop.c: verbosity changes
386 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
387 instead of aborting in one of the test codepaths
389 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
390 caused not printing the pid ever again if a verbose was missing
391 the newline at the end
392 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
394 * dbus/dbus-connection.c: verbosity changes;
395 (dbus_connection_has_messages_to_send): new function
396 (_dbus_connection_message_sent): no longer call transport->messages_pending
397 (_dbus_connection_send_preallocated_unlocked): do one iteration to
398 try to write() immediately, so we can avoid the write watch. This
399 is the core purpose of this patchset
400 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
401 dump the outgoing message queue, so nobody will get confused
402 trying to send them or thinking stuff is pending to be sent
404 * bus/test.c: verbosity changes
406 * bus/driver.c: verbosity/assertion changes
408 * bus/dispatch.c: a bunch of little tweaks to get it working again
409 because this patchset changes when/where you need to block.
411 2004-11-23 Havoc Pennington <hp@redhat.com>
413 * test/glib/test-profile.c: modify to accept a plain_sockets
414 argument in which case it will bench plain sockets instead of
415 libdbus, for comparison purposes.
417 2004-11-22 Havoc Pennington <hp@redhat.com>
419 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
420 threads for more time, so sysprof can get a grip on it.
422 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
425 2004-11-13 Havoc Pennington <hp@redhat.com>
427 * test/glib/test-profile.c: fix this thing up a bit
429 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
430 preallocation sizes by a fair bit; not sure if this will be an
431 overall performance win or not, but it does reduce reallocs.
433 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
434 the test hack that forced constant realloc if asserts are
435 disabled, so we can profile sanely. Sprinkle in some
436 _DBUS_UNLIKELY() which are probably pointless, but before I
437 noticed the real performance problem I put them in.
438 (_dbus_string_validate_utf8): micro-optimize this thing a little
439 bit, though callgrind says it didn't help; then special-case
440 ascii, which did help a lot; then be sure we detect nul bytes as
441 invalid, which is a bugfix.
442 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
443 superstition; use memset to nul the padding instead of a manual
445 (_dbus_string_get_length): inline this as a
446 macro; it showed up in the profile because it's used for loop
449 2004-11-10 Colin Walters <walters@verbum.org>
451 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
454 2004-11-09 Colin Walters <walters@verbum.org>
456 * dbus/dbus-string.c (_dbus_string_get_length): New
457 function, writes DBusString to C buffer.
459 * dbus/dbus-string.h: Prototype it.
461 * dbus/dbus-message.c (dbus_message_type_to_string): New
462 function, converts message type into C string.
464 * dbus/dbus-message.h: Prototype it.
466 * bus/selinux.c (bus_selinux_check): Take source pid,
467 target pid, and audit data. Pass audit data to
469 (log_audit_callback): New function, appends extra
471 (bus_selinux_allows_acquire_service): Also take
472 service name, add it to audit data.
473 (bus_selinux_allows_send): Also take message
474 type, interface, method member, error name,
475 and destination, and add them to audit data.
476 (log_cb): Initialize func_audit.
478 * bus/selinux.h (bus_selinux_allows_acquire_service)
479 (bus_selinux_allows_send): Update prototypes
481 * bus/services.c (bus_registry_acquire_service): Pass
482 service name to bus_selinux_allows_acquire_service.
484 * bus/bus.c (bus_context_check_security_policy): Pass
485 additional audit data. Move assignment of dest
488 2004-11-07 Colin Walters <walters@verbum.org>
490 * dbus/dbus-transport-unix.c (do_authentication): Always
491 initialize auth_completed.
493 2004-11-07 Colin Walters <walters@verbum.org>
495 * bus/bus.c (load_config): Break into three
496 separate functions: process_config_first_time_only,
497 process_config_every_time, and process_config_postinit.
498 (process_config_every_time): Move call of
499 bus_registry_set_service_context_table into
500 process_config_postinit.
501 (process_config_postinit): New function, does
502 any processing that needs to happen late
503 in initialization (and also on reload).
504 (bus_context_new): Instead of calling load_config,
505 open config parser here and call process_config_first_time_only
506 and process_config_every_time directly. Later, after
507 we have forked but before changing UID,
508 invoke bus_selinux_full_init, and then call
509 process_config_postinit.
510 (bus_context_reload_config): As in bus_context_new,
511 load parse file inside here, and call process_config_every_time
512 and process_config_postinit.
514 * bus/services.h, bus/services.c
515 (bus_registry_set_service_context_table): Rename
516 from bus_registry_set_sid_table. Take string hash from config
517 parser, and convert them here into SIDs.
519 * bus/config-parser.c (struct BusConfigParser): Have
520 config parser only store a mapping of service->context
522 (merge_service_context_hash): New function.
523 (merge_included): Merge context string hashes instead
524 of using bus_selinux_id_table_union.
525 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
526 simply create a new string hash.
527 (bus_config_parser_unref): Unref it.
528 (start_selinux_child): Simply insert strings into hash,
529 don't call bus_selinux_id_table_copy_over.
531 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
532 (bus_selinux_id_table_copy_over): Delete.
534 2004-11-03 Colin Walters <walters@verbum.org>
536 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
539 2004-11-03 Colin Walters <walters@verbum.org>
541 * bus/test-main.c (test_pre_hook): Fix test logic,
542 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
544 2004-11-02 Colin Walters <walters@redhat.com>
546 * bus/selinux.c (bus_selinux_init): Split into two functions,
547 bus_selinux_pre_init and bus_selinux_post_init.
548 (bus_selinux_pre_init): Just determine whether SELinux is
550 (bus_selinux_post_init): Do everything else.
552 * bus/main.c (main): Call bus_selinux_pre_init before parsing
553 config file, and bus_selinux_post_init after. This ensures that
554 we don't lose the policyreload notification thread that
555 bus_selinux_init created before forking previously.
557 * bus/test-main.c (test_pre_hook): Update for split.
559 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
561 Patch from Johan Fischer <linux@fischaz.com>
563 * mono/doc/Makefile.am (install-data-local): Added directory
566 2004-10-29 Colin Walters <walters@redhat.com>
568 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
569 parameter for fd to write pid to.
571 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
573 * bus/bus.c (bus_context_new): Pass print_pid_fd
574 to _dbus_become_daemon (bug #1720)
576 2004-10-29 Colin Walters <walters@redhat.com>
578 Patch from Ed Catmur <ed@catmur.co.uk>
580 * mono/doc/Makefile.am (install-data-local): Handle
583 2004-10-29 Colin Walters <walters@redhat.com>
585 * bus/.cvsignore, qt/.cvsignore: Update.
587 2004-10-29 Colin Walters <walters@redhat.com>
589 Patch from Kristof Vansant <de_lupus@pandora.be>
591 * configure.in: Detect Slackware.
592 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
593 * bus/rc.messagebus.in: New file.
595 2004-10-29 Colin Walters <walters@redhat.com>
597 * tools/dbus-monitor.c (filter_func): Return
598 DBUS_HANDLER_RESULT_HANDLED in filter function
600 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
602 2004-10-29 Colin Walters <walters@redhat.com>
604 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
606 * bus/services.c (bus_registry_acquire_service):
607 Correctly retrieve service name from DBusString
610 2004-10-29 Colin Walters <walters@redhat.com>
612 * dbus/dbus-glib.h: Update documentation to not
613 refer to internal APIs.
615 2004-10-27 Joe Shaw <joeshaw@novell.com>
617 * mono/Arguments.cs (GetDBusTypeConstructor):
618 type.UnderlyingSystemType will return "System.Byte" if you do it
619 on "byte[]", which is not what we want. So check the type.IsArray
620 property and use System.Array instead.
622 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
624 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
625 the DBusUserInfo structure since this is passed into the function.
626 This would cause a double free when the function that allocated
627 the structure would try to free it when an error occured.
629 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
630 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
631 for service activation to avoid 32bit/64bit parallel install issues
633 2004-10-21 Colin Walters <walters@verbum.org>
635 * AUTHORS: Fix my email address, the @gnu.org one
636 has been bouncing for some time. Also add J5.
638 2004-10-21 Colin Walters <walters@verbum.org>
640 * dbus/dbus-transport-unix.c (do_authentication): Return
641 authentication status to callers.
642 (unix_handle_watch): If we completed authentication this round,
643 don't do another read. Instead wait until the next iteration,
644 after we've read any pending data in the auth buffer.
645 (unix_do_iteration): Ditto.
646 (unix_handle_watch): Updated for new do_authentication prototype.
648 2004-10-18 Colin Walters <walters@verbum.org>
650 * bus/selinux.c (bus_selinux_enabled): Handle
651 --disable-selinux case.
653 2004-10-18 Colin Walters <walters@verbum.org>
655 * bus/selinux.h: Add bus_selinux_enabled.
657 * bus/selinux.c (bus_selinux_enabled): Implement it.
659 * bus/config-parser.c (struct include): Add
660 if_selinux_enabled member.
661 (start_busconfig_child): Parse if_selinux_enabled
662 attribute for include.
663 (bus_config_parser_content): Handle it.
665 * bus/session.conf.in, bus/system.conf.in: Add
666 inclusion of context mapping to default config files;
667 conditional on SELinux being enabled.
669 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
671 * test/data/invalid-config-files/badselinux-1.conf,
672 test/data/invalid-config-files/badselinux-2.conf:
673 Test files for bad syntax.
675 2004-10-17 Colin Walters <walters@verbum.org>
677 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
678 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
679 format specifier mismatches.
681 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
683 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
686 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
687 pointer (bug #1540, Leonardo Boiko).
689 2004-09-28 Jon Trowbridge <trow@ximian.com>
691 * mono/BusDriver.cs: Changed BusDriver struct to remove
692 the ServiceCreated and ServiceDeleted events and replace them
693 with the new ServiceOwnerChanged event.
695 * mono/example/BusListener.cs: Added a new example program,
696 which listens for and reports any ServiceOwnerChanged events
699 * mono/example/Makefile.am (DESTDIR): Build changes for the
700 new BusListener.cs example.
702 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
704 * bus/signals.c (bus_match_rule_parse): validate the components of
705 match rules (bug #1439).
707 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
709 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
711 * doc/dbus-specification.xml: document ServiceOwnerChanged
714 * bus/driver.c, bus/driver.h, bus/services.c: Use
715 ServiceOwnerChanged signal instead of ServiceCreated and
718 * bus/dispatch.c: update testcase for the new signal.
720 2004-09-20 Jon Trowbridge <trow@ximian.com>
722 Patch from Nat Friedman <nat@novell.com>
724 * mono/Makefile.am: A number of small build fixes to allow "make
725 distcheck" to succeed.
727 * mono/example/Makefile.am: "make distcheck" fixes.
729 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
732 * test/Makefile.am: "make distcheck" fixes.
734 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
736 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
738 * doc/busconfig.dtd: update the DTD for the at_console attribute.
740 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
741 messages after the first one (bug #1389).
743 * bus/dispatch.c (check_double_hello_message): add a test case for
744 the double hello message bug.
745 (check_existent_service_activation): fix check of spawning error.
747 2004-09-16 David Zeuthen <david@fubar.dk>
749 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
751 2004-09-12 David Zeuthen <david@fubar.dk>
753 Patch from Kay Sievers <kay.sievers@vrfy.org>
755 * bus/bus.c (bus_context_new):
759 Add commandline option --nofork to override configuration file
762 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
764 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
765 compilers don't like it (bug #974).
767 2004-09-04 Harald Fernengel <harry@kdevelop.org>
769 * qt/connection.*: Applied patch by JĂ©rĂ´me Lodewyck
770 <lodewyck@clipper.ens.fr> to integrate an existing
771 connection into the Qt eventloop
773 2004-08-30 Jon Trowbridge <trow@ximian.com>
775 * mono/BusDriver.cs: Added. This is a class for interacting with
776 the org.freedesktop.DBus service.
778 * mono/Message.cs: Added a mechanism to expose the message that is
779 currently being dispatched via the static Message.Current
780 property. Added Message.Sender and Message.Destination
783 * mono/Handler.cs: Expose the dispatched message via
784 Message.Current when handling method calls.
786 * mono/Service.cs: Expose the dispatched message via
787 Message.Current when handling signal emissions.
789 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
790 Connection.BaseService property.
792 2004-08-28 Havoc Pennington <hp@redhat.com>
794 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
796 More fixes from Steve Grubb
798 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
799 (_dbus_listen_tcp_socket): fix fd leak
801 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
802 EINTR to a bit lower in the code
804 2004-08-26 Jon Trowbridge <trow@ximian.com>
806 * bus/driver.c (bus_driver_handle_service_exists): Respond with
807 TRUE if we are inquiring about the existence of the built-in
808 org.freedesktop.DBus service.
810 2004-08-25 John Palmieri <johnp@redhat.com>
811 * bus/config-parser.c:
812 (struct PolicyType): Add POLICY_CONSOLE
813 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
814 (start_busconfig_child): Sets up console element when
815 <policy at_console=""> is encountered in a policy file
816 (append_rule_from_element): Convert console elements to console
820 (bus_policy_create_client_policy): Add console rules to the client
821 policy based on if the client is at the console
822 (bus_policy_append_console_rule): New function for adding a
823 console rule to a policy
824 (bus_policy_merge): Handle console rule merging
826 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
827 where we check for console user files
829 * dbus/dbus-sysdeps.c:
830 (_dbus_file_exists): New function which checks if the given
832 (_dbus_user_at_console): New function which does the system
833 specific process of checking if the user is at the console
835 * dbus/dbus-userdb.c:
836 (_dbus_is_console_user): New function converts a UID to user name
837 and then calls the system specific _dbus_user_at_console to
838 see if the user is at the console and therefor a console user
840 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
842 * bus/config-parser.c (set_limit):
843 * bus/dbus-daemon-1.1.in:
844 * test/data/valid-config-files/many-rules.conf: set the
845 max_match_rules_per_connection limt from the config file.
847 * doc/busconfig.dtd: update the DTD.
849 * bus/driver.c: remove some unused variables.
851 2004-08-24 Mikael Hallendal <micke@imendio.com>
853 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
854 it's been replaced by dbus_g_bus_get
856 2004-08-23 Colin Walters <walters@redhat.com>
858 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
860 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
862 * bus/selinux.c: Create a thread for policy reload notification.
863 (bus_selinux_get_policy_root): Implement.
865 * bus/config-parser.c (start_busconfig_child)
866 (bus_config_parser_content): Support SELinux-root relative
869 * configure.in <HAVE_SELINUX>: Add -lpthread.
871 * bus/test-main.c (test_pre_hook, test_post_hook): New.
872 (test_post_hook): Move memory checking into here.
873 (test_pre_hook, test_post_hook): Move SELinux checks in
874 here, but conditional on a DBUS_TEST_SELINUX environment
875 variable. Unfortunately we can't run the SELinux checks
876 as a normal user, since they won't have any permissions
877 for /selinux. So this will have to be tested manually
878 for now, until we have virtualization for most of
881 2004-08-23 Havoc Pennington <hp@redhat.com>
883 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
884 drop supplementary groups, suggested by Steve Grubb
886 2004-08-20 Colin Walters <walters@redhat.com>
888 * bus/config-parser.c (start_busconfig_child): Remove some unused
891 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
894 2004-08-17 Joe Shaw <joeshaw@novell.com>
896 * configure.in: If --enable-mono is passed in, if we can't find
899 * mono/Makefile.am: Use /gacutil to install assemblies into the
902 2004-08-12 Havoc Pennington <hp@redhat.com>
904 * NEWS: update for 0.22
906 * configure.in: release 0.22
908 2004-08-11 Colin Walters <walters@redhat.com>
910 * tools/dbus-send.c (main, usage): Add --reply-timeout
913 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
915 * bus/bus.c (process_config_first_time_only): get rid of an unused
916 DBusError that was causing a memoy leak (bug #989).
918 * dbus/dbus-keyring.c, dbus/dbus-message.c:
919 fix compilation on Solaris/Forte C (bug #974)
921 * bus/main.c (main): plug two minuscule memleaks.
923 2004-08-10 Havoc Pennington <hp@redhat.com>
925 * doc/dbus-tutorial.xml: add some more info on GLib bindings
927 2004-08-09 Havoc Pennington <hp@redhat.com>
929 * COPYING: switch to Academic Free License version 2.1 instead of
930 2.0, to resolve complaints about patent termination clause.
932 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
934 * README: added documentation for the --enable-python
937 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
939 * bus/config-parser.c (bus_config_parser_new): fix an invalid
940 _unref in the SELinux support.
942 * doc/busconfig.dtd: update DTD for SELinux support.
944 * bus/config-loader-libxml.c: fix error handler and parser
945 initialisation/cleanup. OOM test now works with libxml2 HEAD.
947 * configure.in: remove the warning about libxml2.
949 * dbus/dbus-bus.c: silence doxygen warning.
951 2004-07-31 Colin Walters <walters@redhat.com>
953 * configure.in: Move #error in SELinux check to its own line.
955 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
957 * dbus/dbus-internals.h (_DBUS_SET_OOM):
958 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
961 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
962 broken by the change in the _SET_OOM macros.
964 2004-07-31 Colin Walters <walters@redhat.com>
966 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
969 2004-07-31 Colin Walters <walters@redhat.com>
971 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
972 to correctly detect DBUS__ACQUIRE_SVC. Also add an
975 2004-07-24 Havoc Pennington <hp@redhat.com>
977 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
979 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
982 * configure.in: add --enable-selinux
984 * bus/policy.c (bus_policy_merge): add FIXME to a comment
986 * bus/main.c (main): initialize and shut down selinux
988 * bus/connection.c: store SELinux ID on each connection, to avoid
989 repeated getting of the string context and converting it into
992 * bus/bus.c (bus_context_get_policy): new accessor, though it
994 (bus_context_check_security_policy): check whether the security
995 context of sender connection can send to the security context of
998 * bus/config-parser.c: add parsing for <selinux> and <associate>
1000 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
1001 implement dbus_connection_get_unix_fd()
1003 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
1004 function, used by the selinux stuff
1006 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
1008 * bus/config-loader-libxml.c: complete the implementation of
1009 libxml backend for config file loader. Doesn't work with full OOM
1012 * configure.in: change error when selecting libxml into a warning.
1014 * test/data/invalid-config-files: add two non-well-formed XML
1017 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
1019 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
1020 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
1021 be necessary to read all the buffer. (bug #894)
1023 * bus/activation.c (bus_activation_activate_service): fix a
1024 potential assertion failure (bug #896). Small optimization in the
1025 case of auto-activation messages.
1027 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
1028 add test case for byte-through-vararg bug (#901). patch by Kimmo
1031 2004-07-28 Anders Carlsson <andersca@gnome.org>
1034 * python/dbus_bindings.pyx.in:
1035 Add dbus.init_gthreads (), allow emit_signal to pass
1036 arguments to the signal.
1038 2004-07-24 Havoc Pennington <hp@redhat.com>
1040 * AUTHORS: add some people, not really comprehensively, let me
1041 know if I missed you
1043 2004-07-24 Havoc Pennington <hp@redhat.com>
1045 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
1048 * test/Makefile.am (DIST_SUBDIRS): here also
1050 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
1052 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
1053 breaking build on Solaris, reported by Farhad Saberi on the ML.
1055 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
1056 va_arg invocation to account for integer promotion in the case of
1057 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
1059 * bus/services.c (bus_service_remove_owner): fix bug #902, use
1060 _dbus_list_get_first_link, not _dbus_list_get_first.
1062 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
1064 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
1065 handler functions so that the asserts in _dbus_object_subtree_unref
1068 * dbus/dbus-transport-unix.c (do_reading):
1069 _dbus_transport_queue_messages return value is of type
1070 dbus_bool_t, not DBusDispatchStatus.
1072 2004-07-19 David Zeuthen <david@fubar.dk>
1074 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
1077 (check_get_connection_unix_user): Debug says GetProperty; but the
1078 method is called GetConnectionUnixUser
1079 (check_get_connection_unix_process_id): New function
1080 (bus_dispatch_test): Actually call check_get_connection_unix_user();
1081 also call check_get_connection_unix_process_id()
1084 (bus_driver_handle_get_connection_unix_process_id): New function,
1085 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
1089 (handle_server_data_external_mech): Set pid from the credentials
1090 obtained from the socket
1092 * dbus/dbus-connection.c:
1093 (dbus_connection_get_unix_process_id): New function
1095 * dbus/dbus-connection.h:
1096 Add prototype for dbus_connection_get_unix_process_id
1098 * dbus/dbus-transport.c:
1099 (_dbus_transport_get_unix_process_id): New function
1101 * dbus/dbus-transport.h:
1102 Add prototype for _dbus_transport_get_unix_process_id
1104 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
1106 * dbus/dbus-message.c: Message counter fix, patch by Christian
1107 Hammond <chipx86@gnupdate.org>
1109 2004-07-18 Seth Nickell <seth@gnome.org>
1112 * python/dbus_bindings.pyx.in:
1113 * python/tests/test-client.py:
1115 Add dbus.ByteArray and dbus_bindings.ByteArray
1116 types so that byte streams can be passed back.
1118 Give jdahlin the heaps of credit that are so
1121 2004-07-12 Seth Nickell <seth@gnome.org>
1125 Add message argument to the default object_method_handler
1128 * python/dbus_bindings.pyx.in:
1130 Automatically return NIL when passed an empty list
1131 (we can't pass back a list since lists are typed
1132 and we don't have any idea what type the the client
1133 intended the list to be... :-( )
1135 2004-07-10 Seth Nickell <seth@gnome.org>
1137 * python/examples/Makefile.am:
1139 Fix distcheck breakage caused by new examples.
1141 2004-07-10 Seth Nickell <seth@gnome.org>
1145 Add "message" argument to service-side dbus.Object
1146 methods. This will break existing services written
1147 using the python bindings, but will allow extraction
1148 of all the message information (e.g. who its from).
1150 Add improved "object oriented" signal handling/emission.
1152 * python/examples/example-service.py:
1156 * python/examples/example-signal-emitter.py:
1157 * python/examples/example-signal-recipient.py:
1159 Two new examples that show how to emit and receive
1160 signals using the new APIs.
1162 * python/examples/example-signals.py:
1163 * python/examples/gconf-proxy-service.py:
1164 * python/examples/gconf-proxy-service2.py:
1166 Add "message" argument to service methods.
1168 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
1170 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
1171 * dbus/bus.c (dbus_bus_get_unix_user)
1172 * doc/dbus-specification.xml: implement GetConnectionUnixUser
1173 method of org.freedesktop.DBus interface.
1175 * bus/dispatch.c: test case
1177 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
1179 * python/Makefile.am: switched include directory from glib/ to dbus/
1180 since dbus-glib.h moved
1182 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
1184 * configure.in: prevent building the gcj stuff and libxml loader
1185 since they are broken.
1187 2004-06-20 Havoc Pennington <hp@redhat.com>
1189 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
1190 codes from the dbus error names
1192 * glib/dbus-glib.h: move to subdir dbus/ since it's included
1193 as dbus/dbus-glib.h and that breakage is now visible due to
1194 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
1196 * glib/dbus-glib.h: s/gproxy/g_proxy/
1198 * dbus/dbus-shared.h: new header to hold stuff shared with
1201 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
1204 * glib/dbus-glib.h (dbus_set_g_error): move to
1205 dbus-glib-lowlevel.h
1207 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
1208 of stuff to enable this
1210 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
1212 * a bunch of other changes with the same basic "separate glib
1213 bindings from dbus.h" theme
1215 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
1217 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
1219 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
1221 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
1223 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
1224 the reply value of the ServiceExists message.
1226 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
1228 * python/dbus_bindings.pyx.in: No longer need to parse path
1229 elements and pass them as arrays of strings. The C API now
1230 accepts plain path strings.
1231 (_build_parsed_path): removed
1233 2004-06-07 Havoc Pennington <hp@redhat.com>
1235 * doc/TODO: remove auto-activation item since it's done; sort
1236 items by importance/milestone
1238 2004-06-07 Havoc Pennington <hp@redhat.com>
1240 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
1241 random signature when using REQUIRED_FIELDS (this hack won't work
1244 * dbus/dbus-message.c: change the signature to be a header field,
1245 instead of message->signature special-case string. Incremental
1246 step forward. Then we can fix up code to send the signature in the
1247 message, then fix up code to validate said signature, then fix up
1248 code to not put the typecodes inline, etc.
1249 (load_one_message): don't make up the signature after the fact
1250 (decode_header_data): require signature field for the known
1253 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
1255 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
1257 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
1259 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
1261 * mono/Handler.cs: Updated to follow new path argument for
1262 (un-)registering objects.
1264 * mono/example/Makefile.am:
1266 * configure.in: Bumped required version for mono and use new -pkg
1269 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
1271 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
1272 registration functions take the path argument as char* instead of
1275 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
1276 split off the path decompostion part of
1277 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
1280 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
1282 2004-06-02 Kristian Høgsberg <krh@redhat.com>
1284 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
1285 machine approach. A state is implemented as a function that
1286 handles incoming events as specified for that state.
1288 * doc/dbus-specification.xml: Update auth protocol state machine
1289 specification to match implementation. Remove some leftover
1292 2004-06-02 Kristian Høgsberg <krh@redhat.com>
1294 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
1295 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
1298 * Doxyfile.in: remove deprecated options.
1300 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
1301 glib/test-thread.h, glib/test-thread-client.c,
1302 glib/test-thread-server.c, glib/test-profile.c,
1303 glib/test-dbus-glib.c: remove these unused files.
1305 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
1307 * dbus/dbus-object-tree.c
1308 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
1309 non-fallback handlers (bug #684).
1310 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
1311 (find_subtree_recurse): report wether the returned subtree is an
1312 exact match or a "fallback" match higher up in the tree.
1313 (object_tree_test_iteration): update test case.
1315 2004-06-01 Seth Nickell <seth@gnome.org>
1317 * python/dbus_bindings.pyx.in:
1318 * python/tests/test-client.py:
1320 Round off basic type support. Add dicts (yay!), and
1321 remaining array types.
1323 Make MessageIter more general so it works for dicts too.
1325 Mark all loop variables as C integers.
1327 2004-05-31 Havoc Pennington <hp@redhat.com>
1329 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
1332 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
1334 * glib/dbus-glib-tool.c (main): set up to have a --self-test
1335 option that runs the tests, and start filling in some code
1336 including for starters just dumping the interfaces to stdout
1338 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
1340 * test/data/valid-introspection-files/lots-of-types.xml: test of
1341 an example introspection file
1343 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
1346 2004-05-31 Seth Nickell <seth@gnome.org>
1348 * python/dbus_bindings.pyx.in:
1349 * python/tests/test-client.py:
1354 Fix string array memory trashing bug... oops...
1356 2004-05-30 Seth Nickell <seth@gnome.org>
1360 Add a nicer-but-less-flexible alternate API for handling
1361 calls to virtual objects in dbus.ObjectTree.
1363 Screw up the argument order to the dbus.Object constructor
1364 for consistency with dbus.ObjectTree (and to make dbus_methods
1365 optional for future extension)
1367 * python/examples/Makefile.am:
1368 * python/examples/gconf-proxy-service.py:
1369 * python/examples/gconf-proxy-service2.py:
1371 Alternate implementation of gconf-proxy-service using the
1372 nicer dbus.ObjectTree API.
1374 * python/examples/example-service.py:
1375 * python/tests/test-server.py
1377 Reverse the argument order to deal with dbus.Object constructor
1380 2004-05-30 Seth Nickell <seth@gnome.org>
1382 * python/examples/example-client.py:
1383 * python/examples/example-service.py:
1385 Take it back. Lists seem to work but they're broken
1386 in the test suite. Make the base examples use
1389 2004-05-30 Seth Nickell <seth@gnome.org>
1391 * python/dbus_bindings.pyx.in:
1392 * python/tests/test-client.py:
1394 Add some more tests and fix errors that crop up.
1395 Unfortunately, currently it seems like marshalling
1396 and unmarshalling of lists is completely broken :-(
1398 2004-05-30 Seth Nickell <seth@gnome.org>
1400 * python/dbus_bindings.pyx.in:
1402 Add support for ObjectPath type.
1406 Refactor message handling code to a common function.
1408 * python/tests/test-client.py:
1409 * python/tests/test-server.py:
1411 Add tests that check to make sure values of all types
1412 can be echoed from a service w/o mangling.
1414 2004-05-29 Seth Nickell <seth@gnome.org>
1418 Add ObjectTree class which allows implementation
1419 of trees of "virtual" objects. Basically the python
1420 wrapper for "register_fallback".
1422 * python/examples/Makefile.am
1423 * python/examples/gconf-proxy-client.py:
1424 * python/examples/gconf-proxy-service.py:
1426 Implement a simple GConf proxy service that supports
1427 get/set on string and int GConf keys using the ObjectTree.
1429 2004-05-29 Seth Nickell <seth@gnome.org>
1432 * python/examples/example-client.py:
1433 * python/examples/example-service.py:
1434 * python/examples/list-system-services.py:
1436 Add SessionBus, SystemBus and ActivationBus classes
1437 so you don't need to know the special little BUS_TYPE
1440 2004-05-29 Havoc Pennington <hp@redhat.com>
1442 * bus/config-parser.c (process_test_valid_subdir): temporarily
1443 stop testing config parser OOM handling, since expat has issues
1444 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
1446 * bus/dbus-daemon-1.1.in: change requested_reply to
1447 send_requested_reply/receive_requested_reply so we can send the
1448 replies, not just receive them.
1450 * bus/config-parser.c: parse the new
1451 send_requested_reply/receive_requested_reply
1453 * bus/policy.c (bus_client_policy_check_can_send): add
1454 requested_reply argument and use it
1456 * bus/bus.c (bus_context_check_security_policy): pass through
1457 requested_reply status to message send check
1459 * bus/system.conf.in: adapt to requested_reply change
1461 2004-05-28 Havoc Pennington <hp@redhat.com>
1463 * test/glib/test-service-glib.c (main): remove unused variable
1465 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
1467 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
1468 from the enum, no longer in use.
1470 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
1473 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
1474 whether error_name passed in is a valid error name.
1476 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
1478 * dbus/dbus-message.c (dbus_message_get_args): Added support for
1479 OBJECT_PATH and OBJECT_PATH_ARRAY
1481 2004-05-28 Seth Nickell <seth@gnome.org>
1483 * python/examples/Makefile.am:
1485 Forget to add Makefile.am. Do not pass go.
1487 2004-05-28 Michael Meeks <michael@ximian.com>
1489 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
1492 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
1494 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
1495 (_dbus_message_iter_get_basic_type_array): impl.
1496 drastically simplify ~all relevant _get methods to use these.
1497 (_dbus_message_iter_append_basic_array),
1498 (dbus_message_iter_append_basic): impl
1499 drastically simplify ~all relevant _append methods to use these.
1501 * dbus/dbus-message-builder.c (parse_basic_type)
1502 (parse_basic_array, lookup_basic_type): impl.
1503 (_dbus_message_data_load): prune scads of duplicate /
1506 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
1507 (_dbus_demarshal_basic_type): implement,
1508 (demarshal_and_validate_len/arg): beef up debug.
1509 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
1511 2004-05-27 Seth Nickell <seth@gnome.org>
1514 * python/Makefile.am:
1516 Include the example python apps in the tarball.
1518 * python/examples/list-system-services.py
1520 Add a python new example that fetches the list of services
1521 from the system bus.
1523 2004-05-27 Seth Nickell <seth@gnome.org>
1526 * python/dbus_bindings.pyx.in:
1528 Fix failure to notify that a signal was not handled,
1529 resulted in hung functions.
1531 2004-05-25 Colin Walters <walters@redhat.com>
1533 * tools/dbus-monitor.c (main): Monitor all types of messages.
1535 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
1537 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
1538 which unregisters the object path and disposes the handler.
1540 2004-05-23 Kristian Høgsberg <krh@redhat.com>
1542 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
1544 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
1545 operands to && so we call dbus_message_iter_next () for the last
1548 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1550 * dbus/dbus-object-tree.c
1551 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
1552 children even if the requested path isn't registered.
1553 (object_tree_test_iteration): test object_tree_list_registered.
1555 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
1558 2004-05-20 Kristian Høgsberg <krh@redhat.com>
1560 * doc/TODO: Remove resolved items.
1562 * bus/expirelist.h (struct BusExpireList): remove unused n_items
1565 * bus/connection.c (bus_connections_expect_reply): Enforce the
1566 per-connection limit on pending replies.
1568 Patch from Jon Trowbridge <trow@ximian.com>:
1570 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
1571 up a watch that triggers a config reload when one end of the pipe
1573 (signal_handler): Instead of doing the config reload in our SIGHUP
1574 handler, just write to the reload pipe and let the associated
1575 watch handle the reload when control returns to the main loop.
1577 * bus/driver.c (bus_driver_handle_reload_config): Added.
1578 Implements a ReloadConfig method for requesting a configuration
1579 file reload via the bus driver.
1581 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
1583 * HACKING: Updated release instructions concerning the wiki page.
1585 2004-05-18 Kristian Høgsberg <krh@redhat.com>
1587 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
1588 filter against auth->allowed_mechs; we only add allowed mechs in
1589 record_mechanisms().
1591 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
1592 ALLOWED_MECHS to auth-script format so we can set the list of
1595 * data/auth/client-out-of-mechanisms.auth-script: New test to
1596 check client disconnects when it is out of mechanisms to try.
1598 * dbus/dbus-auth.c (process_command): Remove check for lines
1599 longer that 1 MB; we only buffer up maximum 16 kB.
1601 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1602 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
1603 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
1604 assume there might be unused bytes.
1606 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
1607 client-out-of-mechs, it is handled in process_reject(). Move check
1608 for max failures to send_rejected(), as it's a server-only thing.
1610 * dbus/dbus-auth.c: Factor out protocol reply code into functions
1611 send_auth(), send_data(), send_rejected(), send_error(),
1612 send_ok(), send_begin() and send_cancel().
1614 2004-05-17 Kristian Høgsberg <krh@redhat.com>
1616 Remove base64 encoding, replace with hex encoding. Original patch
1617 from trow@ximian.com, added error handling.
1619 * dbus/dbus-string.c (_dbus_string_base64_encode)
1620 (_dbus_string_base64_decode): Remove.
1621 (_dbus_string_hex_decode): Add end_return argument so we can
1622 distinguish between OOM and invalid hex encoding.
1623 (_dbus_string_test): Remove base64 tests and add test case for
1626 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
1627 Replace base64 with hex.
1629 * test/data/auth/invalid-hex-encoding.auth-script: New test case
1630 for invalid hex encoded data in auth protocol.
1632 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1634 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
1637 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1639 * mono/dbus-sharp.dll.config.in: Added for GAC
1640 * mono/dbus-sharp.snk: Added for GAC
1641 * mono/Assembly.cs.in: Added for GAC
1642 * mono/Makefile.am: Changes for GAC installation
1643 * configure.in: Added refs for dbus-sharp.dll.config.in and
1644 Assembly.cs.in. More fixes for mono testing
1645 * mono/example/Makefile.am: Changed var to CSC
1646 * Makefile.am: Changed flag name to DBUS_USE_CSC
1648 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1650 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
1651 * mono/doc/*: Added documentation framework
1652 * configure.in: Added monodoc check
1653 * README: Added description of mono configure flags
1655 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
1657 * doc/dbus-specification.xml: Added a "Required" column to the
1658 header fields table and changed the "zero or more" verbage in
1659 the above paragraph to read "The header must contain the required
1660 named header fields and zero or more of the optional named header
1662 * test/data/invalid-messages/*.message: Added the required PATH
1663 named header field to the tests so that they don't fail on
1664 'Missing path field'
1666 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
1668 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
1669 the stack by implicitly defining variable and parameter types and
1670 removing the hack of defining C pointers as python objects and later
1673 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
1675 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
1677 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
1679 * mono/DBusType/Dict.cs: Handle empty dicts
1680 * mono/DBusType/Array.cs: Handle empty arrays
1681 * mono/Arguments.cs: Handle empty arguments
1683 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
1685 * dbus-sharp.pc.in: Modified to include include Libs and Requires
1688 2004-04-25 Kristian Høgsberg <krh@redhat.com>
1690 * test/data/valid-messages/standard-*.message: Update message
1691 test scripts to new header field names.
1693 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
1695 * test/break-loader.c (randomly_do_n_things): tracked down buffer
1696 overflow to times_we_did_each_thing array which would chop off the
1697 first character of the failure_dir string. Increased the size of
1698 the array to 7 to reflect the number of random mutation functions
1701 2004-04-21 Kristian Høgsberg <krh@redhat.com>
1703 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
1704 unix_server->watch here, it is unreffed in disconnect.
1705 (_dbus_server_new_for_tcp_socket): convert NULL host to
1706 "localhost" here so we don't append NULL to address.
1708 * dbus/dbus-server.c (_dbus_server_test): Add test case for
1709 various addresses, including tcp with no explicit host.
1711 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1713 * dbus/dbus-message.c (decode_header_data, decode_string_field):
1714 fix incorrect setting of .name_offset in the HeaderField (it was
1715 off by two bytes, positioned right after the name and typecode)
1717 * bus/bus.c (bus_context_new, bus_context_unref): test before
1718 calling dbus_server_free_data_slot and _dbus_user_database_unref
1719 in case of an error.
1721 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1724 2004-04-19 Kristian Høgsberg <krh@redhat.com>
1726 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1727 _dbus_poll() instead of select().
1729 2004-04-15 Jon Trowbridge <trow@ximian.com>
1731 * bus/main.c (signal_handler): Reload the configuration files
1733 (main): Set up our SIGHUP handler.
1735 * bus/bus.c (struct BusContext): Store the config file, user and
1736 fork flag in the BusContext.
1737 (process_config_first_time_only): Added. Contains the code
1738 (previously in bus_context_new) for setting up the BusContext from
1739 the BusConfigParser that should only be run the first time the
1740 config files are read.
1741 (process_config_every_time): Added. Contains the code (previously
1742 in bus_context_new) for setting up the BusContext from the
1743 BusConfigParser that should be run every time the config files are
1745 (load_config): Added. Builds a BusConfigParser from the config
1746 files and passes the resulting structure off to
1747 process_config_first_time_only (assuming this is the first time)
1748 and process_config_every_time.
1749 (bus_context_new): All of the config-related code has been moved
1750 to process_config_first_time_only and process_config_every_time.
1751 Now this function just does the non-config-related initializations
1752 and calls load_config.
1753 (bus_context_reload_config): Added.
1755 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
1757 * bus/driver.c (bus_driver_handle_get_service_owner):
1758 implement a GetServiceOwner method.
1759 * doc/dbus-specification.xml: document it.
1760 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1762 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1763 implement, using the bus GetServiceOwner method.
1765 * test/glib/test-dbus-glib.c:
1766 use dbus_gproxy_new_for_service_owner so that we can receive the
1769 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
1771 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1772 dbus/dbus-message.c, dbus/dbus-protocol.h
1773 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1775 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1776 dbus/dbus-message.c, dbus/dbus-protocol.h
1777 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1779 * dbus/dbus-internals.c (_dbus_header_field_to_string):
1780 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1781 DBUS_HEADER_FIELD_SENDER resolves to "sender"
1783 * doc/dbus-specification.xml (Header Fields Table):
1784 s/SERVICE/DESTINATION
1785 s/SENDER_SERVICE/SENDER
1788 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
1790 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1793 2004-04-13 Michael Meeks <michael@ximian.com>
1795 * glib/dbus-gobject.c (handle_introspect): split out
1796 (introspect_properties): this.
1797 (handle_introspect): implement this.
1799 * test/glib/Makefile.am: use the absolute path so the bus
1800 daemon's chdir ("/") doesn't kill us dead.
1802 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1804 2004-04-12 Jon Trowbridge <trow@ximian.com>
1806 * bus/config-parser.c (struct BusConfigParser): Added
1807 included_files field.
1808 (seen_include): Added. Checks whether or not a file has already
1809 been included by any parent BusConfigParser.
1810 (bus_config_parser_new): Copy the parent's included_files.
1811 (include_file): Track which files have been included, and fail on
1812 circular inclusions.
1813 (process_test_valid_subdir): Changed printf to report if we are
1814 testing valid or invalid conf files.
1815 (all_are_equiv): Changed printf to be a bit clearer about
1816 what we are actually doing.
1817 (bus_config_parser_test): Test invalid configuration files.
1819 2004-04-09 Jon Trowbridge <trow@ximian.com>
1821 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1822 argument. If non-null, the newly-constructed BusConfigParser will
1823 be initialized with the parent's BusLimits instead of the default
1825 (include_file): When including a config file, pass in
1826 the current parser as the parent and then copy the BusLimits
1827 from the included BusConfigParser pack to the current parser.
1828 (process_test_valid_subdir): Renamed from process_test_subdir.
1829 (process_test_equiv_subdir): Added. Walks through a directory,
1830 descending into each subdirectory and loading the config files
1831 it finds there. If any subdirectory contains two config files
1832 that don't produce identical BusConfigParser structs, fail.
1833 For now, the BusConfigParser's BusPolicies are not compared.
1834 (bus_config_parser_test): Call both process_test_valid_subdir and
1835 process_test_equiv_subdir.
1837 * bus/config-loader-libxml.c (bus_config_load): Take a parent
1838 argument and pass it along to the call to bus_config_parser_new.
1839 Also made a few small changes to allow this code to compile.
1841 * bus/config-loader-expat.c (bus_config_load): Take a parent
1842 argument and pass it along to the call to bus_config_parser_new.
1844 * bus/bus.c (bus_context_new): Load the config file
1845 with a NULL parent argument.
1847 2004-03-29 Michael Meeks <michael@ximian.com>
1849 * glib/dbus-gobject.c (introspect_properties): split
1850 out, fix mangled 'while' flow control.
1851 (introspect_signals): implement.
1852 (handle_introspect): update.
1854 2004-03-29 Michael Meeks <michael@ximian.com>
1856 * glib/dbus-gobject.c (set_object_property): split out /
1857 re-work, use the property type, and not the message type(!)
1858 (get_object_property): ditto.
1860 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1861 (dbus_gvalue_marshal): make this code re-usable, needed
1862 for signals too, also on both proxy and server side.
1863 Re-write for more efficiency / readability.
1865 2004-03-29 Michael Meeks <michael@ximian.com>
1867 * dbus/dbus-message.c
1868 (dbus_message_new_error_printf): impl.
1870 * dbus/dbus-connection.c
1871 (dbus_connection_unregister_object_path): fix warning.
1873 * configure.in: fix no-mono-installed situation.
1875 2004-03-27 Havoc Pennington <hp@redhat.com>
1877 Patch from Timo Teräs:
1879 * tools/dbus-send.c (main): if --print-reply, assume type is
1880 method call; support boolean type args
1882 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1883 bunch of memleak and logic bugs
1885 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1887 * mono/Arguments.cs:
1888 * mono/Introspector.cs:
1890 * mono/InterfaceProxy.cs:
1892 * mono/ProxyBuilder.cs:
1894 Added InterfaceProxy class to avoid building proxies for every
1898 * dbus-message.c (dbus_message_append_args_valist)
1899 (dbus_message_iter_get_object_path)
1900 (dbus_message_iter_get_object_path_array)
1901 (dbus_message_iter_append_object_path)
1902 (dbus_message_iter_append_object_path_array):
1903 Added object_path iter functions to handle OBJECT_PATH arguments
1905 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1907 First checkin of mono bindings.
1910 Build stuff for the bindings
1911 * dbus-sharp.pc.in: Added for pkgconfig
1913 2004-03-21 Havoc Pennington <hp@redhat.com>
1915 * test/test-service.c (main): remove debug spew
1917 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1919 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1922 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1923 (dbus_message_iter_init_array_iterator)
1924 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1925 indicate whether the iterator is empty
1927 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1930 2004-03-19 Havoc Pennington <hp@redhat.com>
1932 * NEWS: 0.21 updates
1934 * configure.in: 0.21
1936 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1938 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1939 you don't need pyrex to make dist
1941 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1944 2004-03-18 Richard Hult <richard@imendio.com>
1946 * dbus/dbus-message.c (dbus_message_get_auto_activation)
1947 (dbus_message_set_auto_activation): Add doxygen docs.
1949 2004-03-16 Richard Hult <richard@imendio.com>
1951 * bus/activation.c: (bus_activation_service_created),
1952 (bus_activation_send_pending_auto_activation_messages),
1953 (bus_activation_activate_service):
1955 * bus/dispatch.c: (bus_dispatch),
1956 (check_nonexistent_service_auto_activation),
1957 (check_service_auto_activated),
1958 (check_segfault_service_auto_activation),
1959 (check_existent_service_auto_activation), (bus_dispatch_test):
1960 * bus/driver.c: (bus_driver_handle_activate_service):
1961 * bus/services.c: (bus_registry_acquire_service):
1962 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
1963 (dbus_message_get_auto_activation):
1964 * dbus/dbus-message.h:
1965 * dbus/dbus-protocol.h: Implement auto-activation.
1967 * doc/dbus-specification.xml: Add auto-activation to the spec.
1969 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
1971 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
1972 fix a bug with CUSTOM types.
1974 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1975 a unit test for this bug (used to fail).
1977 2004-03-12 Mikael Hallendal <micke@imendio.com>
1980 (babysitter_watch_callback): notify all pending activations waiting for
1981 the same exec that the activation failed.
1982 (bus_activation_activate_service): shortcut the activation if we
1983 already waiting for the same executable to start up.
1985 2004-03-12 Mikael Hallendal <micke@imendio.com>
1988 - Added service file reloading.
1989 Each service files directory is kept in an hash table in
1990 BusActivation and each BusActivationEntry knows what .service-file it
1991 was read from. So when you try to activate a service the bus will
1992 check if it's been updated, removed or if new .service-files has
1994 - Test code at the bottom for the service file reloading.
1995 * bus/test-main.c: (main):
1997 - added service reloading test.
1998 * dbus/dbus-sysdeps.c:
1999 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
2001 2004-03-08 Michael Meeks <michael@ximian.com>
2003 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
2004 bail immediately if disconnected, to avoid busy loop.
2006 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
2007 cleanup cut/paste/inefficiency.
2009 2004-03-01 David Zeuthen <david@fubar.dk>
2011 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
2012 bug where args were used twice. This bug resulted in a segfault
2013 on a Debian/PPC system when starting the messagebus daemon. Include
2014 dbus-sysdeps.h for DBUS_VA_COPY
2016 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
2018 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
2019 appropriate va_copy implementation. From GLib
2021 2004-02-24 Joe Shaw <joe@ximian.com>
2023 * bus/services.c (bus_registry_acquire_service): We need to pass
2024 in the service name to dbus_set_error() to prevent a crash.
2026 2003-12-26 Anders Carlsson <andersca@gnome.org>
2028 * AUTHORS: Reveal my True identity.
2030 2003-12-17 Mikael Hallendal <micke@imendio.com>
2032 * dbus/dbus-message.c: (dbus_message_append_args_valist):
2033 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
2035 2003-12-13 Mikael Hallendal <micke@imendio.com>
2037 * doc/TODO: Added not about better error check of configuration files.
2039 2003-12-02 Richard Hult <richard@imendio.com>
2041 * Update AFL version to 2.0 throughout the source files to reflect
2042 the update that was done a while ago.
2044 2003-12-02 Richard Hult <richard@imendio.com>
2046 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
2047 wrote_dict_key to FALSE on the iter that the dict is appended to,
2048 just like when appending other types. Fixes a bug where a dict
2049 couldn't be put inside a dict.
2050 (dbus_message_iter_append_dict_key): Fix typo in warning message.
2051 (message_iter_test, _dbus_message_test): Add test case for dict
2054 2003-12-01 David Zeuthen <david@fubar.dk>
2056 * python/dbus.py: Add the actual message when calling the reciever
2057 of a signal such that parameters can be inspected. Add the method
2058 remove_signal_receiver
2060 2003-11-26 Mikael Hallendal <micke@imendio.com>
2064 * glib/*.[ch]: Made ref functions return the pointer
2066 2003-11-25 Zack Rusin <zack@kde.org>
2068 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
2070 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
2073 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
2074 the Integrator and to better fit with the server,
2076 2003-11-24 Zack Rusin <zack@kde.org>
2078 * qt/connection.h, qt/connection.cpp: removing initDbus method since
2079 the integrator handles it now
2081 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
2082 since QTimer wasn't really meant to be used the way DBusTimeout is
2084 2003-11-24 Zack Rusin <zack@kde.org>
2086 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
2087 Integrator class which integrates D-BUS with the Qt event loop,
2089 * qt/connection.h, qt/connection.cpp: Move all the code which
2090 was dealing with D-BUS integration to the Integrator class,
2091 and start using Integrator,
2093 2003-11-23 Zack Rusin <zack@kde.org>
2095 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
2098 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
2099 switching namespaces to DBusQt, reworking the class,
2101 * Makefile.cvs: switching dependencies so that it matches KDE
2104 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
2107 2003-11-19 Havoc Pennington <hp@redhat.com>
2111 * configure.in: bump version to 0.20
2113 * configure.in (have_qt): add yet another place to look for qt
2114 (someone hand trolltech a .pc file...)
2116 2003-11-01 Havoc Pennington <hp@redhat.com>
2118 * doc/dbus-specification.xml: add state machine docs on the auth
2119 protocol; just a first draft, I'm sure it's wrong.
2121 2003-10-28 David Zeuthen <david@fubar.dk>
2123 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
2124 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
2126 2003-10-28 Havoc Pennington <hp@redhat.com>
2128 * dbus/dbus-message.c (get_next_field): delete unused function
2130 2003-10-28 Havoc Pennington <hp@redhat.com>
2132 * bus/expirelist.c (do_expiration_with_current_time): detect
2133 failure of the expire_func due to OOM
2135 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
2137 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
2138 NoReply error that's now created by the bus when the service exits
2140 2003-10-28 Havoc Pennington <hp@redhat.com>
2142 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
2143 tests for set_path, set_interface, set_member, etc.
2145 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
2147 * dbus/dbus-message.c (set_string_field): always just delete and
2148 re-append the field; accept NULL for deletion
2149 (re_align_fields_recurse): reimplement
2151 2003-10-26 Havoc Pennington <hp@redhat.com>
2153 * dbus/dbus-connection.c: fix docs to properly describe the
2154 disconnected message
2155 (_dbus_connection_notify_disconnected): remove this function;
2156 we can't synchronously add the disconnected message, we have to
2157 do it after we've queued any remaining real messages
2158 (_dbus_connection_get_dispatch_status_unlocked): queue the
2159 disconnect message only if the transport has finished queueing all
2160 its real messages and is disconnected.
2161 (dbus_connection_disconnect): update the dispatch status here
2163 2003-10-22 Havoc Pennington <hp@redhat.com>
2165 * bus/bus.c (bus_context_check_security_policy): fix up assertion
2167 * bus/connection.c (bus_transaction_send_from_driver): set the
2168 destination to the connection's base service
2170 2003-10-20 Havoc Pennington <hp@redhat.com>
2172 hmm, make check is currently not passing.
2174 * doc/dbus-specification.xml: add requirement that custom type
2175 names follow the same rules as interface names.
2177 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
2178 duplication and allow 'c' to be 'custom'; dict is now 'm' for
2181 * doc/dbus-specification.xml: update type codes to match
2182 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
2183 CUSTOM. Add type OBJECT_PATH to the spec.
2185 2003-10-17 Havoc Pennington <hp@redhat.com>
2187 * bus/driver.c (create_unique_client_name): use "." as separator
2188 in base service names instead of '-'
2190 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
2191 byte at the end of the string
2193 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
2194 optimization macros since string validation seems to be a slow
2197 * doc/dbus-specification.xml: restrict valid
2198 service/interface/member/error names. Add test suite code for the
2201 * dbus/dbus-string.c: limit service/interface/member/error names
2204 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
2205 format arg to verbose spew
2207 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
2208 memory, return instead of g_error
2210 * test/test-service.c (path_message_func): support emitting a
2213 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
2214 activation bus type if DBUS_BUS_ACTIVATION was set; default to
2215 assuming the activation bus was the session bus so that services
2216 started manually will still register.
2217 (init_connections_unlocked): fix so that in OOM situation we get
2218 the same semantics when retrying the function
2220 * test/test-service.c (main): change to use path registration, to
2221 test those codepaths; register with DBUS_BUS_ACTIVATION rather
2222 than DBUS_BUS_SESSION
2224 2003-10-16 Havoc Pennington <hp@redhat.com>
2226 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
2228 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
2229 coverage of the tests
2230 (coverage-report.txt): don't move the .da and .bbg files around
2232 2003-10-16 Havoc Pennington <hp@redhat.com>
2234 * bus/bus.c (struct BusContext): remove struct field I didn't mean
2237 2003-10-16 Havoc Pennington <hp@redhat.com>
2239 * bus/connection.c (bus_pending_reply_expired): either cancel or
2241 (bus_connections_check_reply): use unlink, not remove_link, as we
2242 don't want to free the link; fixes double free mess
2244 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
2245 where no reply was received
2247 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
2250 * bus/signals.c (match_rule_matches): add special cases for the
2251 bus driver, so you can match on sender/destination for it.
2253 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
2254 DBUS_PRINT_BACKTRACE is set
2256 * dbus/dbus-internals.c: add pid to assertion failure messages
2258 * dbus/dbus-connection.c: add message type code to the debug spew
2260 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
2261 sender=foo not service=foo
2263 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
2264 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
2265 DBUS_ACTIVATION_ADDRESS instead
2267 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
2268 DBUS_SYSTEM_BUS_ADDRESS if appropriate
2270 * bus/bus.c (bus_context_new): handle OOM copying bus type into
2273 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
2274 (dbus_message_iter_get_object_path_array): new function (half
2275 finished, disabled for the moment)
2277 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
2278 DBUS_MESSAGE_TYPE_ERROR
2280 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
2281 avoid redirecting stderr to /dev/null
2282 (babysit): close stdin if not doing the "exit_with_session" thing
2284 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
2285 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
2286 stdout/stdin, so things don't get confused
2288 * bus/system.conf.in: fix to allow replies, I modified .conf
2289 instead of .conf.in again.
2291 2003-10-14 David Zeuthen <david@fubar.dk>
2293 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
2294 argtype to arg_type when raising unknown arg type exception.
2295 Changed type list to reflect the changes in dbus-protocol.h so
2296 the bindings actually work.
2298 2003-10-14 Havoc Pennington <hp@redhat.com>
2300 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
2301 to have a bug keeping it from outputting the .da files sometimes
2302 (string_get_string): don't append garbage nul bytes to the string.
2304 2003-10-15 Seth Nickell <seth@gnome.org>
2306 * python/Makefile.am:
2308 Include dbus_h_wrapper.h in the dist tarball.
2310 2003-10-14 Havoc Pennington <hp@redhat.com>
2312 * bus/bus.c (bus_context_check_security_policy): revamp this to
2313 work more sanely with new policy-based requested reply setup
2315 * bus/connection.c (bus_transaction_send_from_driver): set bus
2316 driver messages as no reply
2318 * bus/policy.c (bus_client_policy_check_can_receive): handle a
2319 requested_reply attribute on allow/deny rules
2321 * bus/system.conf: add <allow requested_reply="true"/>
2323 * bus/driver.c (bus_driver_handle_message): fix check for replies
2324 sent to the bus driver, which was backward. How did this ever work
2325 at all though? I think I'm missing something.
2327 * dbus/dbus-message.c (decode_header_data): require error and
2328 method return messages to have a reply serial field to be valid
2329 (_dbus_message_loader_queue_messages): break up this function;
2330 validate that reply serial and plain serial are nonzero;
2331 clean up the OOM/error handling.
2332 (get_uint_field): don't return -1 from this
2333 (dbus_message_create_header): fix signed/unsigned bug
2335 * bus/connection.c (bus_connections_expect_reply): save serial of
2336 the incoming message, not reply serial
2338 2003-10-14 Havoc Pennington <hp@redhat.com>
2340 * bus/connection.c: implement pending reply tracking using
2343 * bus/bus.c (bus_context_check_security_policy): verify that a
2344 reply is pending in order to allow a reply to be sent. Deny
2345 messages of unknown type.
2347 * bus/dbus-daemon-1.1.in: update to mention new resource limits
2349 * bus/bus.c (bus_context_get_max_replies_per_connection): new
2350 (bus_context_get_reply_timeout): new
2352 2003-10-13 Seth Nickell <seth@gnome.org>
2354 * python/Makefile.am:
2356 Pass "make distcheck": remove a couple files from DIST_FILES
2357 that weren't included in the final version.
2359 2003-10-12 Havoc Pennington <hp@pobox.com>
2361 Added test code that 1) starts an actual bus daemon and 2) uses
2362 DBusGProxy; fixed bugs that were revealed by the test. Lots
2363 more testing possible, but this is the basic framework.
2365 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
2366 empty proxy lists from the proxy list hash
2368 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
2369 couple of return_if_fail checks
2371 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
2372 to allocate, so everything is cleared to NULL as it should be.
2374 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
2375 source as data to dbus_connection_set_timeout_functions() as the
2376 timeout functions expected
2378 * test/glib/run-test.sh: add a little script to start up a message
2379 bus and run tests using it
2381 * tools/dbus-launch.1: updates
2383 * tools/dbus-launch.c (main): add --config-file option
2385 * tools/dbus-launch.c (main): remove confusing else if (runprog)
2386 that could never be reached.
2388 * dbus/dbus-message.c (dbus_message_new_method_return)
2389 (dbus_message_new_error, dbus_message_new_signal): set the
2390 no-reply-expected flag on all these. Redundant, but may
2391 as well be consistent.
2393 2003-10-11 Havoc Pennington <hp@pobox.com>
2395 * test/decode-gcov.c (function_solve_graph): make broken block
2396 graph a nonfatal error since it seems to be broken. Need to debug
2399 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
2400 can't just check type > INVALID < LAST anymore
2402 * dbus/dbus-message.c (dbus_message_get_signature): new function
2403 (dbus_message_has_signature): new function
2404 (struct DBusMessage): add signature field (right now it isn't sent
2405 over the wire, just generated on the fly)
2406 (dbus_message_copy): copy the signature, and init strings to
2407 proper length to avoid some reallocs
2408 (dbus_message_iter_init_array_iterator): return void, since it
2410 (dbus_message_iter_init_dict_iterator): return void since it can't fail
2411 (_dbus_message_loader_queue_messages): add silly temporary hack to
2412 fill in message->signature on load
2414 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
2415 characters, so they are relatively human-readable.
2417 2003-10-11 Havoc Pennington <hp@pobox.com>
2419 * dbus/dbus-message.c (_dbus_message_test): add more test
2420 coverage, but #if 0 for now since they uncover a bug
2421 not fixed yet; I think in re_align_field_recurse()
2422 (re_align_field_recurse): add FIXME about broken assertion
2424 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
2426 * bus/connection.c: share a couple code bits with expirelist.c
2428 * bus/expirelist.h, bus/expirelist.c: implement a generic
2429 expire-items-after-N-seconds facility, was going to share between
2430 expiring connections and replies, decided not to use for expiring
2431 connections for now.
2433 * COPYING: include AFL 2.0 (still need to change all the file headers)
2435 2003-10-09 Havoc Pennington <hp@redhat.com>
2437 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
2438 gcc 3.3. Not that we do anything about it yet.
2440 * bus/signals.c (bus_match_rule_parse): impose max length on the
2443 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
2445 2003-10-09 Havoc Pennington <hp@redhat.com>
2447 Make matching rules theoretically work (add parser).
2449 * bus/bus.c (bus_context_check_security_policy): fix up to handle
2450 the case where destination is explicitly specified as bus driver
2451 and someone else is eavesdropping.
2453 * bus/policy.c (bus_client_policy_check_can_receive): fix up
2454 definition of eavesdropping and assertion
2456 * tools/dbus-send.c (main): use dbus_message_type_from_string
2458 * bus/signals.c (bus_match_rule_parse): implement
2460 * dbus/dbus-message.c (dbus_message_type_from_string): new
2462 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
2464 2003-10-02 Havoc Pennington <hp@pobox.com>
2466 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
2467 dbus_gproxy_oneway_call
2469 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
2470 (dbus_server_setup_with_g_main): fix to allow calling them more
2471 than once on the same args
2472 (dbus_bus_get_with_g_main): new function
2474 2003-10-02 Havoc Pennington <hp@redhat.com>
2476 * doc/dbus-tutorial.xml: write some stuff
2478 2003-09-29 Havoc Pennington <hp@pobox.com>
2480 * configure.in: split checks for Doxygen from XML docs, check for
2483 * doc/Makefile.am: XML-ify all the docs, and add a blank
2486 2003-09-29 Havoc Pennington <hp@pobox.com>
2488 * Merge dbus-object-names branch. To see the entire patch
2489 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
2490 it's huuuuge though.
2491 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
2493 2003-09-28 Havoc Pennington <hp@pobox.com>
2495 * HACKING: update to reflect new server
2497 2003-09-26 Seth Nickell <seth@gnome.org>
2500 * python/examples/example-signals.py:
2502 Start implementing some notions of signals. The API
2503 is really terrible, but they sort of work (with the
2504 exception of being able to filter by service, and to
2505 transmit signals *as* a particular service). Need to
2506 figure out how to make messages come from the service
2509 * python/dbus_bindings.pyx.in:
2511 Removed duplicate message_handler callbacks.
2513 2003-09-25 Havoc Pennington <hp@redhat.com>
2515 * bus/session.conf.in: fix my mess
2517 2003-09-25 Havoc Pennington <hp@pobox.com>
2519 * bus/session.conf.in: fix security policy, reported by Seth Nickell
2521 2003-09-25 Seth Nickell <seth@gnome.org>
2523 * python/examples/example-service.py:
2525 Johan notices complete wrong code in example-service, but
2526 completely wrong in a way that works exactly the same (!).
2527 Johan is confused, how could this possibly work? Example
2528 code fails to serve purpose of making things clear.
2531 2003-09-25 Mark McLoughlin <mark@skynet.ie>
2533 * doc/dbus-specification.sgml: don't require header fields
2534 to be 4-byte aligned and specify that fields should be
2535 distinguished from padding by the fact that zero is not
2538 * doc/TODO: remove re-alignment item and add item to doc
2539 the OBJECT_PATH type.
2541 * dbus/dbus-message.c:
2542 (HeaderField): rename the original member to value_offset
2543 and introduce a name_offset member to keep track of where
2544 the field actually begins.
2545 (adjust_field_offsets): remove.
2546 (append_int_field), (append_uint_field),
2547 (append_string_field): don't align the start of the header
2548 field to a 4-byte boundary.
2549 (get_next_field): impl finding the next marhsalled field
2550 after a given field.
2551 (re_align_field_recurse): impl re-aligning a number of
2552 already marshalled fields.
2553 (delete_field): impl deleting a field of any type and
2554 re-aligning any following fields.
2555 (delete_int_or_uint_field), (delete_string_field): remove.
2556 (set_int_field), (set_uint_field): no need to re-check
2557 that we have the correct type for the field.
2558 (set_string_field): ditto and impl re-aligning any
2560 (decode_header_data): update to take into account that
2561 the fields aren't 4-byte aligned any more and the new
2562 way to distinguish padding from header fields. Also,
2563 don't exit when there is too much header padding.
2564 (process_test_subdir): print the directory.
2565 (_dbus_message_test): add test to make sure a following
2566 field is re-aligned correctly after field deletion.
2568 * dbus/dbus-string.[ch]:
2569 (_dbus_string_insert_bytes): rename from insert_byte and
2570 allow the insert of multiple bytes.
2571 (_dbus_string_test): test inserting multiple bytes.
2573 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
2574 warning note to docs about having to re-align any
2575 marshalled values following the string.
2577 * dbus/dbus-message-builder.c:
2578 (append_string_field), (_dbus_message_data_load):
2579 don't align the header field.
2581 * dbus/dbus-auth.c: (process_test_subdir): print the
2584 * test/break-loader.c: (randomly_add_one_byte): upd. for
2587 * test/data/invalid-messages/bad-header-field-alignment.message:
2590 * test/data/valid-messages/unknown-header-field.message: shove
2591 a dict in the unknown field.
2593 2003-09-25 Seth Nickell <seth@gnome.org>
2596 * python/dbus_bindings.pyx.in:
2598 Handle return values.
2600 * python/examples/example-client.py:
2601 * python/examples/example-service.py:
2603 Pass back return values from the service to the client.
2605 2003-09-24 Seth Nickell <seth@gnome.org>
2609 Connect Object methods (when you are sharing an object) up... pass
2610 in a list of methods to be shared. Sharing all the methods just
2611 worked out too weird. You can now create nice Services over the
2614 * python/dbus_bindings.pyx.in:
2616 Keep references to user_data tuples passed into C functions so
2617 Python doesn't garbage collect on us.
2619 Implement MethodReturn and Error subclasses of Message for creating
2620 DBusMessage's of those types.
2622 * python/examples/example-client.py:
2623 * python/examples/example-service.py:
2625 Simple example code showing both how create DBus services and objects,
2626 and how to use them.
2628 2003-09-23 Havoc Pennington <hp@pobox.com>
2630 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
2632 2003-09-23 Havoc Pennington <hp@redhat.com>
2634 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
2635 (dbus_gproxy_disconnect_signal): implement
2636 (dbus_gproxy_manager_remove_signal_match): implement
2637 (dbus_gproxy_manager_add_signal_match): implement
2638 (dbus_gproxy_oneway_call): implement
2640 2003-09-23 Havoc Pennington <hp@pobox.com>
2642 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
2643 subclass. This means dropping the transparent thread safety of the
2644 proxy; you now need a separate proxy per-thread, or your own
2645 locking on the proxy. Probably right anyway.
2646 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
2648 2003-09-22 Havoc Pennington <hp@redhat.com>
2650 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
2652 2003-09-21 Seth Nickell <seth@gnome.org>
2654 First checkin of the Python bindings.
2656 * python/.cvsignore:
2657 * python/Makefile.am:
2658 * python/dbus_bindings.pyx.in:
2659 * python/dbus_h_wrapper.h:
2661 Pieces for Pyrex to operate on, building a dbus_bindings.so
2662 python module for low-level access to the DBus APIs.
2666 High-level Python module for accessing DBus objects.
2671 Build stuff for the python bindings.
2675 Extra macro needed for finding the Python C header files.
2677 2003-09-21 Havoc Pennington <hp@pobox.com>
2679 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
2680 implementing the proxy manager, didn't get very far.
2682 * dbus/dbus-bus.c (dbus_bus_add_match): new
2683 (dbus_bus_remove_match): new
2685 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
2686 path_name argument; adjust the other not-yet-implemented
2687 gproxy constructors to be what I think they should be.
2689 2003-09-21 Havoc Pennington <hp@pobox.com>
2691 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
2692 by default for message bus connections.
2694 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
2695 exit_on_disconnect flag is set and we process the disconnected
2697 (dbus_connection_set_exit_on_disconnect): new function
2699 2003-09-21 Havoc Pennington <hp@pobox.com>
2701 Get matching rules mostly working in the bus; only actually
2702 parsing the rule text remains. However, the client side of
2703 "signal connections" hasn't been started, this patch is only the
2706 * dbus/dispatch.c: fix for the matching rules changes
2708 * bus/driver.c (bus_driver_handle_remove_match)
2709 (bus_driver_handle_add_match): send an ack reply from these
2712 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2713 arguments, reported by Seth Nickell
2715 * bus/config-parser.c (append_rule_from_element): support
2716 eavesdrop=true|false attribute on policies so match rules
2717 can be prevented from snooping on the system bus.
2719 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2720 and "destination" in attribute names; fix some docs bugs;
2721 add eavesdrop=true|false attribute
2723 * bus/driver.c (bus_driver_handle_add_match)
2724 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2727 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2728 rid of broadcast service concept, signals are just always broadcast
2730 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2731 mostly implement matching rules stuff (currently only exposed as signal
2734 2003-09-21 Mark McLoughlin <mark@skynet.ie>
2736 * doc/dbus-specification.sgml: Change the header field name
2737 to be an enum and update the rest of the spec to reference
2738 the fields using the conventinal name.
2740 * dbus/dbus-protocol.h: update to reflect the spec.
2742 * doc/TODO: add item to remove the 4 byte alignment requirement.
2744 * dbus/dbus-message.c: Remove the code to generalise the
2745 header/body length and serial number header fields as named
2746 header fields so we can reference field names using the
2748 (append_int_field), (append_uint_field), (append_string_field):
2749 Append the field name as a byte rather than four chars.
2750 (delete_int_or_uint_field), (delete_string_field): reflect the
2751 fact that the field name and typecode now occupy 4 bytes instead
2753 (decode_string_field), (decode_header_data): update to reflect
2754 protocol changes and move the field specific encoding from
2755 decode_string_field() back into decode_header_data().
2757 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2758 Add utility to aid debugging.
2760 * dbus/dbus-message-builder.c:
2761 (append_string_field), (_dbus_message_data_load): Update to
2762 reflect protocol changes; Change the FIELD_NAME directive
2763 to HEADER_FIELD and allow it to take the field's conventional
2764 name rather than the actual value.
2766 * test/data/*/*.message: Update to use HEADER_FIELD instead
2767 of FIELD_NAME; Always align the header on an 8 byte boundary
2768 *before* updating the header length.
2770 2003-09-15 Havoc Pennington <hp@pobox.com>
2772 * dbus/dbus-pending-call.c: add the get/set object data
2773 boilerplate as for DBusConnection, etc. Use generic object data
2774 for the notify callback.
2776 * glib/dbus-gparser.c (parse_node): parse child nodes
2778 * tools/dbus-viewer.c: more hacking on the dbus-viewer
2780 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2781 contain functions shared between the convenience lib and the
2784 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2785 -export-symbols-regex to the GLib library
2787 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2788 fix the locking in here, and add a default handler for
2789 Introspect() that just returns sub-nodes.
2791 2003-09-14 Havoc Pennington <hp@pobox.com>
2793 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2794 rather than gfoo consistent
2796 * glib/dbus-gproxy.h: delete for now, move contents to
2797 dbus-glib.h, because the include files don't work right since we
2798 aren't in the dbus/ subdir.
2800 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2801 (dbus_gproxy_end_call): finish
2802 (dbus_gproxy_begin_call): finish
2804 * glib/dbus-gmain.c (dbus_set_g_error): new
2806 * glib/dbus-gobject.c (handle_introspect): include information
2807 about child nodes in the introspection
2809 * dbus/dbus-connection.c (dbus_connection_list_registered): new
2810 function to help in implementation of introspection
2812 * dbus/dbus-object-tree.c
2813 (_dbus_object_tree_list_registered_and_unlock): new function
2815 2003-09-12 Havoc Pennington <hp@pobox.com>
2817 * glib/dbus-gidl.h: add common base class for all the foo_info
2820 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2823 * test/Makefile.am: try test srcdir -ef . in addition to test
2824 srcdir = ., one of them should work (yeah lame)
2826 * glib/Makefile.am: build the "idl" parser stuff as a convenience
2829 * glib/dbus-gparser.h: make description_load routines return
2830 NodeInfo* not Parser*
2832 * Makefile.am (SUBDIRS): build test dir after all library dirs
2834 * configure.in: add GTK+ detection
2836 2003-09-07 Havoc Pennington <hp@pobox.com>
2838 * Make Doxygen contented.
2840 2003-09-07 Havoc Pennington <hp@pobox.com>
2842 * doc/dbus-specification.sgml: more updates
2844 2003-09-06 Havoc Pennington <hp@pobox.com>
2846 * doc/dbus-specification.sgml: partial updates
2848 * bus/dbus-daemon-1.1.in: fix the config file docs for the
2849 zillionth time; hopefully I edited the right file this time.
2851 * bus/config-parser.c (append_rule_from_element): support
2852 send_type, send_path, receive_type, receive_path
2854 * bus/policy.c: add message type and path to the list of things
2855 that can be "firewalled"
2857 2003-09-06 Havoc Pennington <hp@pobox.com>
2859 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2860 (dbus_connection_register_object_path): make this not handle
2861 messages to paths below the given path
2863 2003-09-03 Havoc Pennington <hp@pobox.com>
2865 * test/glib/Makefile.am: add this with random glib-linked test
2868 * glib/Makefile.am: remove the random test programs from here,
2869 leave only the unit tests
2871 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
2872 uscore/javacaps conversion, and fix
2873 (get_object_property, set_object_property): change to .NET
2874 convention for mapping props to methods, set_FooBar/get_FooBar,
2875 since one language has such a convention we may as well copy it.
2876 Plus real methods in either getFooBar or get_foo_bar style won't
2877 collide with this convention.
2879 2003-09-01 Havoc Pennington <hp@pobox.com>
2881 * glib/dbus-gparser.c: implement
2883 * glib/dbus-gobject.c: start implementing skeletons support
2885 * configure.in: when disabling checks/assert, also define
2886 G_DISABLE_ASSERT and G_DISABLE_CHECKS
2888 2003-09-01 Havoc Pennington <hp@pobox.com>
2890 * glib/Makefile.am: rearrange a bunch of files and get "make
2891 check" framework set up
2893 2003-08-31 Havoc Pennington <hp@pobox.com>
2895 * fix build with --disable-tests
2897 2003-08-30 Havoc Pennington <hp@pobox.com>
2899 * dbus/dbus-connection.c: purge DBusMessageHandler
2901 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
2902 use callbacks everywhere
2904 2003-08-30 Havoc Pennington <hp@pobox.com>
2906 * test/data/valid-config-files/system.d/test.conf: change to
2907 root for the user so warnings don't get printed
2909 * dbus/dbus-message.c: add dbus_message_get_path,
2910 dbus_message_set_path
2912 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2913 dispatching to a path
2915 * dbus/dbus-string.c (_dbus_string_validate_path): add
2917 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2918 (_dbus_marshal_object_path): implement
2920 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
2921 to contain the path to the target object
2922 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2923 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2925 2003-08-30 Havoc Pennington <hp@pobox.com>
2927 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2929 2003-08-29 Havoc Pennington <hp@pobox.com>
2931 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2933 (struct DBusObjectSubtree): shrink this
2934 a lot, since we may have a lot of them
2935 (_dbus_object_tree_free_all_unlocked): implement
2936 (_dbus_object_tree_dispatch_and_unlock): implement
2938 2003-08-29 Havoc Pennington <hp@pobox.com>
2940 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2942 2003-08-28 Havoc Pennington <hp@pobox.com>
2946 * dbus/dbus-connection.c: port to no ObjectID, create a
2947 DBusObjectTree, rename ObjectTree to ObjectPath in public API
2949 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
2950 everything except UnregisterFunction and MessageFunction
2952 * dbus/dbus-marshal.c: port away from DBusObjectID,
2953 add DBUS_TYPE_OBJECT_PATH
2955 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
2956 dbus/dbus-objectid.[hc]: remove these, we are moving to
2957 path-based object IDs
2959 2003-08-25 Havoc Pennington <hp@pobox.com>
2961 Just noticed that dbus_message_test is hosed, I wonder when I
2962 broke that. I thought make check was passing earlier...
2964 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
2965 container tree, will replace most of dbus-object-registry
2967 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
2970 2003-08-19 Havoc Pennington <hp@pobox.com>
2972 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
2973 (dbus_message_is_error): fix this function
2975 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2978 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2979 reflect clarified man page
2980 (bus_client_policy_check_can_send): ditto
2982 * bus/session.conf.in: fixup
2984 * bus/system.conf.in: fixup
2986 2003-08-18 Havoc Pennington <hp@redhat.com>
2988 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2990 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2991 dumb bug created earlier (wrong order of args to
2992 decode_header_data())
2994 * tools/dbus-send.c: port
2996 * tools/dbus-print-message.c (print_message): port
2998 * test/data/*messages: port all messages over
3000 * dbus/dbus-message-builder.c: support including
3003 * bus/driver.c: port over
3005 * bus/dispatch.c: port over to new stuff
3007 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3008 rename disconnect signal to "Disconnected"
3010 2003-08-17 Havoc Pennington <hp@pobox.com>
3012 This doesn't compile yet, but syncing up so I can hack on it from
3013 work. What are branches for if not broken code? ;-)
3015 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
3016 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
3017 DBUS_HEADER_FIELD_ERROR_NAME
3019 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
3020 for the interface+member pairs
3021 (string_hash): change to use g_str_hash algorithm
3022 (find_direct_function, find_string_function): refactor these to
3025 * dbus/dbus-message.c: port all of this over to support
3026 interface/member fields instead of name field
3028 * dbus/dbus-object-registry.c: port over
3030 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
3031 from _dbus_string_validate_name
3033 * bus/dbus-daemon-1.1: change file format for the
3034 <deny>/<allow> stuff to match new message naming scheme
3036 * bus/policy.c: port over
3038 * bus/config-parser.c: parse new format
3040 2003-08-16 Havoc Pennington <hp@pobox.com>
3042 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
3045 * glib/dbus-gproxy.c: some hacking
3047 2003-08-15 Havoc Pennington <hp@redhat.com>
3049 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
3051 * dbus/dbus-connection.c
3052 (dbus_connection_send_with_reply_and_block): factor out internals;
3053 change to convert any error replies to DBusError instead of
3054 returning them as a message
3056 2003-08-15 Havoc Pennington <hp@pobox.com>
3058 * dbus/dbus-connection.c,
3059 dbus/dbus-pending-call.c: Finish the pending call stuff
3061 2003-08-14 Havoc Pennington <hp@redhat.com>
3063 * dbus/dbus-pending-call.c: start on new object that will replace
3064 DBusMessageHandler and ReplyHandlerData for tracking outstanding
3067 * dbus/dbus-gproxy.c: start on proxy object used to communicate
3068 with remote interfaces
3070 * dbus/dbus-gidl.c: do the boring boilerplate in here
3072 2003-08-12 Havoc Pennington <hp@pobox.com>
3074 * bus/dispatch.c (bus_dispatch): make this return proper
3075 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
3077 * dbus/dbus-errors.c (dbus_set_error): use
3078 _dbus_string_append_printf_valist
3080 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
3081 (_dbus_string_append_printf): new
3083 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
3086 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
3087 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
3088 message is unhandled.
3090 2003-08-11 Havoc Pennington <hp@pobox.com>
3092 * bus/test.c (client_disconnect_handler): change to return
3093 HANDLED (would have been REMOVE_MESSAGE)
3095 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
3096 HANDLED/NOT_YET_HANDLED instead of
3097 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
3100 2003-08-10 Havoc Pennington <hp@pobox.com>
3102 * tools/dbus-send.c (main): add --type argument, for now
3103 supporting only method_call and signal types.
3105 * tools/dbus-print-message.c: print message type
3107 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3108 init connection->objects
3110 * doc/dbus-specification.sgml: fix sgml
3112 * bus/*.c: port over to object-instance API changes
3114 * test/test-service.c: ditto
3116 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
3117 name, we will have to fix up the rest of the code to also handle
3119 (dbus_message_new): generic message-creation call
3120 (set_string_field): allow appending name field
3122 2003-08-06 Havoc Pennington <hp@pobox.com>
3124 * dbus/dbus-object-registry.c: implement signal connection
3127 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
3129 * dbus/dbus-internals.c (_dbus_memdup): new function
3131 2003-08-02 Havoc Pennington <hp@pobox.com>
3133 * dbus/dbus-message.c (dbus_message_get_no_reply)
3134 (dbus_message_set_no_reply): add these and remove
3135 set_is_error/get_is_error
3137 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
3138 remove the ERROR flag, since there's now an ERROR type
3140 2003-08-01 Havoc Pennington <hp@pobox.com>
3142 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
3145 * dbus/dbus-message.c (dbus_message_get_type): new function
3147 * doc/dbus-specification.sgml: add "type" byte to messages
3149 2003-08-01 Havoc Pennington <hp@pobox.com>
3151 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
3152 a message type enum to distinguish kinds of message
3153 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
3154 that need not be replied to
3156 2003-08-01 Havoc Pennington <hp@pobox.com>
3158 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
3159 (unpack_8_octets): fix no-64-bit-int bug
3161 * dbus/dbus-object-registry.c (validate_id): validate the
3162 connection ID bits, not just the instance ID.
3164 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
3165 the connection-global 33 bits of the object ID
3167 * dbus/dbus-object-registry.c (info_from_entry): fill in
3168 object ID in the new way
3170 * dbus/dbus-objectid.h: rather than high/low bits, specifically
3171 define server/client/instance bits.
3173 2003-07-30 Havoc Pennington <hp@pobox.com>
3175 * dbus/dbus-connection.c (dbus_connection_register_object): fix
3178 2003-07-13 Havoc Pennington <hp@pobox.com>
3180 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
3181 fields to DBusObjectVTable and DBusObjectInfo
3183 2003-07-12 Havoc Pennington <hp@pobox.com>
3185 * dbus/dbus-object-registry.c: implement unit test,
3186 fix bugs discovered in process
3188 * dbus/dbus-connection.c: remove handler_table and
3189 register_handler(), add DBusObjectRegistry usage
3191 * dbus/dbus-objectid.c (dbus_object_id_is_null)
3192 (dbus_object_id_set_null): new functions
3194 2003-07-08 Havoc Pennington <hp@pobox.com>
3196 * dbus/dbus-object.c: implement some of this
3198 * dbus/dbus-object-registry.c
3199 (_dbus_object_registry_add_and_unlock): fill in the object_id out
3201 (_dbus_object_registry_new): handle OOM
3203 2003-07-08 Havoc Pennington <hp@pobox.com>
3205 * dbus/dbus-object.h: sketch out an API for registering objects
3206 with a connection, that allows us to use as little as 24 bytes
3207 per object and lets application code represent an object in
3208 any conceivable way.
3210 * dbus/dbus-object-registry.c: implement the hard bits of the
3211 DBusConnection aspect of object API. Not yet wired up.
3213 2003-07-06 Havoc Pennington <hp@pobox.com>
3215 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
3216 (_dbus_marshal_object_id): new
3217 (_dbus_demarshal_object_id): new
3218 (_dbus_marshal_get_arg_end_pos): support object ID type, and
3219 consolidate identical switch cases. Don't conditionalize handling
3220 of DBUS_TYPE_UINT64, need to handle the type always.
3221 (_dbus_marshal_validate_arg): consolidate identical cases, and
3222 handle DBUS_TYPE_OBJECT_ID
3224 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
3226 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
3228 2003-09-28 Havoc Pennington <hp@pobox.com>
3232 2003-09-28 Havoc Pennington <hp@pobox.com>
3234 * doc/Makefile.am (dbus-specification.html): testing a funky hack
3235 to work with Debian db2html
3237 2003-09-28 Havoc Pennington <hp@pobox.com>
3239 * configure.in: 0.13
3241 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
3242 stylesheet-images for benefit of Debian
3244 Change back to using filesystem-linked sockets for the system
3245 bus, so only root can create the default system bus address.
3247 * bus/system.conf.in: change to use
3248 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
3250 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
3253 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
3254 here, and AC_DEFINE DBUS_SYSTEM_PATH
3256 2003-08-09 Anders Carlsson <andersca@codefactory.se>
3259 * doc/busconfig.dtd:
3262 2003-08-09 Anders Carlsson <andersca@codefactory.se>
3264 * doc/dbus-specification.sgml:
3265 Add activation reply values.
3267 2003-08-05 Havoc Pennington <hp@redhat.com>
3269 * configure.in: 0.12
3271 2003-08-05 Anders Carlsson <andersca@codefactory.se>
3273 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
3274 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
3275 (add_watch), (remove_watch), (create_source):
3276 Refcount fds, fixes some reentrancy issues.
3278 2003-07-30 Havoc Pennington <hp@redhat.com>
3280 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
3281 bus address to be abstract if we have abstract sockets
3285 2003-07-28 Havoc Pennington <hp@redhat.com>
3287 * bus/messagebus.in: fix to avoid processname/servicename
3288 confusion, from Michael Kearey
3289 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
3291 2003-07-23 Havoc Pennington <hp@pobox.com>
3293 * dbus/dbus-message.c (dbus_message_iter_get_named):
3294 fix from Andy Hanton to remove broken "+1"
3296 2003-07-16 Havoc Pennington <hp@pobox.com>
3298 * tools/dbus-launch.c (babysit): close stdout/stderr in the
3299 babysitter process, as suggested by Thomas Leonard, so
3300 an "eval `dbus-launch --exit-with-session`" will actually
3303 2003-07-16 Havoc Pennington <hp@pobox.com>
3305 * configure.in: print out EXPANDED_* variables in the summary at
3306 the end; clean up the code that computes EXPANDED_ variables and
3307 get the ones using exec_prefix right. Should make things work
3308 when you build without --prefix
3310 2003-06-29 Havoc Pennington <hp@pobox.com>
3312 * mono/Test.cs (class Test): fire up a main loop and run it
3314 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
3315 done once, the app has to do it
3317 2003-06-26 Havoc Pennington <hp@pobox.com>
3319 * mono/Connection.cs: set up connection with the glib main loop
3321 2003-07-01 Havoc Pennington <hp@redhat.com>
3323 * doc/dbus-specification.sgml: clarify the format of a type code,
3324 change suggested by Jim Blandy
3326 2003-06-29 Miloslav Trmac <mitr@volny.cz>
3329 * tools/Makefile.am: Don't assume srcdir == builddir.
3331 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
3332 the allocated block.
3333 (_dbus_memory_test): New function.
3334 * dbus/dbus-test.h: Add _dbus_memory_test ().
3335 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
3337 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
3339 (dbus_message_new): Remove obsolete @todo.
3341 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
3342 (_dbus_marshal_set_uint64): Fix comment.
3344 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
3345 hardcode FIELD_REPLY_SERIAL.
3347 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
3348 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
3350 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
3351 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
3353 2003-06-24 Havoc Pennington <hp@pobox.com>
3355 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
3357 2003-06-23 Anders Carlsson <andersca@codefactory.se>
3363 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
3364 * gcj/org/.cvsignore:
3365 * gcj/org/Makefile.am:
3366 * gcj/org/freedesktop/.cvsignore:
3367 * gcj/org/freedesktop/Makefile.am:
3368 * gcj/org/freedesktop/dbus/.cvsignore:
3369 * gcj/org/freedesktop/dbus/Makefile.am:
3370 * gcj/org/freedesktop/dbus/Message.java: (Message),
3372 * gcj/org/freedesktop/dbus/natMessage.cc:
3373 Fix the build system.
3375 2003-06-22 Havoc Pennington <hp@pobox.com>
3377 * mono/Connection.cs: add more bindings
3379 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
3382 2003-06-22 Havoc Pennington <hp@pobox.com>
3384 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
3385 Start wrapping more stuff.
3387 2003-06-22 Havoc Pennington <hp@pobox.com>
3389 * mono/Message.cs: implement Message.Wrap() that ensures we only
3390 have a single C# wrapper per DBusMessage, assuming it works which
3391 it probably doesn't.
3393 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
3394 (dbus_message_free_data_slot): new
3395 (dbus_message_set_data): new
3396 (dbus_message_get_data): new
3398 2003-06-22 Havoc Pennington <hp@pobox.com>
3400 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
3401 (_dbus_data_slot_allocator_alloc): rework these to keep a
3402 reference count on each slot and automatically manage a global
3403 slot ID variable passed in by address
3405 * bus/bus.c: convert to new dataslot API
3407 * dbus/dbus-bus.c: convert to new dataslot API
3409 * dbus/dbus-connection.c: convert to new dataslot API
3411 * dbus/dbus-server.c: convert to new dataslot API
3413 * glib/dbus-gmain.c: ditto
3417 * bus/connection.c: ditto
3419 2003-06-22 Anders Carlsson <andersca@codefactory.se>
3421 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
3422 after the gcj checks so that the correct configuration tags
3423 will be added to libtool.
3425 * dbus-glib-1.pc.in: No need to specify any includes since
3426 dbus-1.pc.in has those.
3428 2003-06-22 Havoc Pennington <hp@pobox.com>
3430 * mono/*, gcj/*, configure.in, Makefile.am:
3431 Check in makefiles and subdirs for mono and gcj bindings.
3432 Neither binding actually exists, just trying to get through
3433 all the build and other boring bits.
3435 2003-06-21 Philip Blundell <philb@gnu.org>
3437 * tools/dbus-monitor.1: Updated.
3439 * tools/dbus-send.1: Likewise.
3441 2003-06-20 Anders Carlsson <andersca@codefactory.se>
3443 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
3444 for hangup and error after checking read so we won't discard
3445 pending data if both hangup and read are set.
3447 2003-06-19 Philip Blundell <philb@gnu.org>
3449 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
3451 * tools/dbus-send.c: Accept both --system and --session.
3453 * tools/dbus-monitor.c: Same here.
3455 2003-06-19 Anders Carlsson <andersca@codefactory.se>
3457 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
3458 from C++ (Patch by Miloslav Trmac).
3460 2003-06-15 Joe Shaw <joe@assbarn.com>
3462 * configure.in: Check for socklen_t.
3464 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
3466 * test/test-segfault.c: Add #include <sys/time.h>
3468 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
3469 dbus-launch needs it.
3471 2003-06-09 Havoc Pennington <hp@redhat.com>
3473 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
3474 SUN_LEN, it breaks abstract socket usage
3476 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
3479 2003-06-04 Havoc Pennington <hp@pobox.com>
3481 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
3482 using unix:abstract=/foo, and when listening in a tmpdir
3483 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
3485 * dbus/dbus-transport.c (_dbus_transport_open): support
3488 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3489 support abstract sockets
3491 * dbus/dbus-transport-unix.c
3492 (_dbus_transport_new_for_domain_socket): support abstract sockets
3494 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
3495 toggle as an argument, implement abstract namespace support
3496 (_dbus_listen_unix_socket): ditto
3498 * configure.in: add --enable-abstract-sockets and implement
3499 a configure check for autodetection of the right value.
3501 2003-06-01 Havoc Pennington <hp@pobox.com>
3503 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
3504 in /tmp (though on Linux this will end up being useless,
3505 when we add abstract namespace support)
3507 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
3510 2003-05-28 Colin Walters <walters@verbum.org>
3512 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
3514 2003-05-18 Anders Carlsson <andersca@codefactory.se>
3516 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
3518 2003-05-17 Colin Walters <walters@gnu.org>
3520 * tools/dbus-send.c: Don't exit with an error code if --help was
3521 passed. Default to using the session bus instead of the system
3524 * tools/dbus-launch.c: Ditto.
3526 * tools/dbus-monitor.c: Ditto.
3528 * tools/dbus-send.1: Update with new arguments.
3530 * tools/dbus-launch.c: Emit code to export variables. New
3531 arguments -s and -c to specify shell syntax, and a bit of code to
3532 autodetect syntax. Also, allow specifying a program to run.
3534 * tools/dbus-launch.1: Update with new arguments.
3536 * tools/dbus-send.1: Ditto.
3538 * tools/dbus-monitor.1: Ditto.
3540 2003-05-17 Havoc Pennington <hp@pobox.com>
3542 * bus/config-parser.c (merge_included): merge in policies from
3543 child configuration file.
3545 * bus/policy.c (bus_policy_merge): function to merge two policies
3548 2003-05-16 Havoc Pennington <hp@redhat.com>
3550 * dbus/dbus-connection.c: disable verbose lock spew
3552 * tools/dbus-send.c: add --print-reply command line option
3554 * tools/dbus-print-message.h (print_message): new util function
3555 shared by dbus-send and dbus-monitor
3557 * tools/dbus-monitor.c (handler_func): exit on disconnect
3559 * dbus/dbus-transport-unix.c (do_reading): if the transport is
3560 disconnected, don't try to use the read_watch
3562 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
3563 so we can find this bug more easily
3565 2003-05-16 Havoc Pennington <hp@redhat.com>
3567 * bus/policy.c (free_rule_list_func): avoid a crash when passed
3568 NULL as DBusHashTable is annoyingly likely to do.
3570 2003-05-16 Colin Walters <walters@verbum.org>
3572 * tools/dbus-monitor.c: Add --session argument and usage()
3575 * tools/dbus-monitor.1: Update with new --session arg.
3577 * bus/Makefile.am (install-data-hook): Create
3578 $(libdir)/dbus-1.0/services so that the session bus is happy.
3580 2003-05-15 Havoc Pennington <hp@redhat.com>
3582 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
3583 on non-x86. ifdef's are evil.
3585 2003-05-15 Havoc Pennington <hp@redhat.com>
3587 * configure.in: 0.11
3591 * bus/Makefile.am (initddir): apparently we are supposed to put
3592 init scripts in /etc/rc.d/init.d not /etc/init.d
3594 * bus/Makefile.am: remove the "you must --enable-tests to make
3595 check" as it broke distcheck
3597 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
3599 2003-05-13 James Willcox <jwillcox@gnome.org>
3602 * bus/activation.c: (bus_activation_service_created),
3603 (bus_activation_activate_service):
3604 * bus/driver.c: (bus_driver_send_service_deleted),
3605 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3606 (bus_driver_send_service_acquired),
3607 (bus_driver_send_welcome_message),
3608 (bus_driver_handle_list_services):
3609 * bus/session.conf.in:
3610 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
3611 (dbus_bus_service_exists), (dbus_bus_activate_service):
3614 Add some convenience API which lets you activate a service, and did a
3615 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
3616 and dbus_message_get_args()
3618 2003-05-11 Havoc Pennington <hp@pobox.com>
3620 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
3621 calling _dbus_marshal_validate_arg() for every byte in a byte
3624 * dbus/dbus-message-handler.c: use atomic reference counting to
3625 reduce number of locks slightly; the global lock in here sucks
3627 * dbus/dbus-connection.c
3628 (_dbus_connection_update_dispatch_status_and_unlock): variant of
3629 update_dispatch_status that can be called with lock held; then use
3630 in a couple places to reduce locking/unlocking
3631 (dbus_connection_send): hold the lock over the whole function
3632 instead of acquiring it twice.
3634 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
3636 * bus/connection.c (bus_connections_setup_connection): fix access
3637 to already-freed memory.
3639 * dbus/dbus-connection.c: keep a little cache of linked list
3640 nodes, to avoid using the global linked list alloc lock in the
3641 normal send-message case. Instead we just use the connection lock
3642 that we already have to take.
3644 * dbus/dbus-list.c (_dbus_list_find_last): new function
3646 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
3647 change to use a struct for the atomic type; fix docs,
3648 they return value before increment, not after increment.
3650 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
3651 (_dbus_string_append_8_aligned): new functions to try to
3652 microoptimize this operation.
3653 (reallocate_for_length): break this out of set_length(), to
3654 improve profile info, and also so we can consider inlining the
3657 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
3658 strings with some preallocation, cuts down on our calls to realloc
3659 a fair bit. Though if we can get the "move entire string to empty
3660 string" optimization below to kick in here, it would be better.
3662 * dbus/dbus-string.c (_dbus_string_move): just call
3663 _dbus_string_move_len
3664 (_dbus_string_move_len): add a special case for moving
3665 an entire string into an empty string; we can just
3666 swap the string data instead of doing any reallocs.
3667 (_dbus_string_init_preallocated): new function
3669 2003-05-11 Havoc Pennington <hp@pobox.com>
3671 Write a "test-profile" that does echo client-server with threads;
3672 profile reveals lock contention, memcpy/realloc of buffers, and
3673 UTF-8 validation as hot spots. 20% of lock contention eliminated
3674 with dbus_atomic_inc/dec implementation on x86. Much remaining
3675 contention is global mempool locks for GList and DBusList.
3677 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
3680 * dbus/dbus-connection.c (struct DBusConnection): use
3681 dbus_atomic_t for the reference count
3683 * dbus/dbus-message.c (struct DBusMessage): declare
3684 dbus_atomic_t values as volatile
3686 * configure.in: code to detect ability to use atomic integer
3687 operations in assembly, from GLib patch
3689 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
3690 time, tired of it being wrong in threads and forked processes
3692 * glib/test-profile.c: a little program to bounce messages back
3693 and forth between threads and eat CPU
3695 * dbus/dbus-connection.c: add debug spew macros for debugging
3696 thread locks; include config.h at top; fix deadlock in
3697 dbus_connection_flush()
3699 2003-05-08 Havoc Pennington <hp@pobox.com>
3701 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
3702 data from getting written, and there wasn't a good reason to
3705 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
3706 dbus_verbose lines in test coverage
3707 (main): add list of functions sorted by # of untested blocks
3708 to the coverage report
3710 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3712 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3714 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3715 extend test coverage
3717 * test/data/auth/cancel.auth-script: test canceling an
3720 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3721 aren't used. in CVS history if we end up needing them.
3723 2003-05-04 Havoc Pennington <hp@pobox.com>
3725 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3728 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3729 function, which assumed length was in # of strings, not bytes
3731 * dbus/dbus-message.c (_dbus_message_test): add tests for some
3734 * dbus/dbus-connection.c
3735 (_dbus_connection_queue_received_message): disable function for
3736 now, we are only using it in test mode
3738 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3739 remove a mistaken FIXME
3741 2003-05-04 Havoc Pennington <hp@pobox.com>
3743 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3744 unlock mutex on successful return, patch from Anders Gustafsson
3746 2003-05-04 Havoc Pennington <hp@pobox.com>
3748 * dbus-glib-1.pc.in (Requires): fix dependencies, from
3751 2003-05-04 Havoc Pennington <hp@pobox.com>
3753 * tools/dbus-launch.c: implement
3755 * bus/main.c (main), bus/bus.c (bus_context_new):
3756 implement --print-pid and --fork
3758 2003-05-03 Havoc Pennington <hp@redhat.com>
3760 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3761 the address had no value, and add to test suite. Fix and
3762 regression test from Miloslav Trmac
3764 2003-05-03 Havoc Pennington <hp@pobox.com>
3766 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3767 watch is invalid when handled
3769 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3770 dbus-launch utility to launch the bus from a shell script. Didn't
3771 actually implement dbus-launch yet, it's just a placeholder still.
3773 2003-05-03 Havoc Pennington <hp@pobox.com>
3775 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3776 daemon; also documents daemon config file, so replaces
3777 doc/config-file.txt. Corrected some stuff from config-file.txt in
3778 the process of moving it.
3780 2003-05-03 Havoc Pennington <hp@pobox.com>
3782 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3785 2003-05-03 Colin Walters <walters@verbum.org>
3787 * dbus/dbus-sysdeps.c (fill_user_info): Test against
3788 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3790 * Makefile.am: Update to use new .pc versioning scheme.
3792 2003-05-02 Havoc Pennington <hp@redhat.com>
3794 * bus/system.conf.in: allow send/receive to/from message bus
3797 2003-04-30 Havoc Pennington <hp@redhat.com>
3799 * configure.in: print a note when building with unit tests and
3802 2003-04-30 Havoc Pennington <hp@redhat.com>
3804 * Makefile.am: add a check-local that complains if you didn't
3805 configure with --enable-tests
3807 2003-04-29 Havoc Pennington <hp@redhat.com>
3809 * glib/dbus-gmain.c: docs cleanups
3811 * dbus/dbus-types.h: add docs on int64 types
3813 * dbus/dbus-memory.c: fix docs to avoid putting private API in
3814 public API docs section
3816 2003-04-29 Havoc Pennington <hp@redhat.com>
3818 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3819 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3820 parallel install API version, not with the D-BUS package version.
3822 * HACKING: move some of README over here
3824 * README: updates, and document API/ABI policy
3826 * configure.in: reindentation
3828 2003-04-29 Havoc Pennington <hp@redhat.com>
3830 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3831 to use this library" to be sure people have the right
3834 2003-04-28 Havoc Pennington <hp@redhat.com>
3836 * configure.in: add --enable-docs which by default is auto yes if
3837 doxygen and db2html found, no otherwise; but can be forced on/off
3839 * doc/Makefile.am: conditionalize whether to build docs on
3842 2003-04-28 Havoc Pennington <hp@redhat.com>
3844 * configure.in: 0.10
3848 * bus/system.conf.in: add <includedir>system.d</includedir>
3850 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3851 username was provided but not uid
3853 * bus/config-parser.c (struct BusConfigParser): keep track of
3854 whether the parser is toplevel or was included; change some
3855 of the error handling if it's included.
3857 2003-04-27 Havoc Pennington <hp@pobox.com>
3861 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3862 report correct status if we finish processing authentication
3863 inside this function.
3865 * bus/activation.c (try_send_activation_failure): use
3866 bus_transaction_send_error_reply
3868 * bus/connection.c (bus_connection_get_groups): return an error
3869 explaining the problem
3871 * bus/bus.c (bus_context_check_security_policy): implement
3872 restriction here that inactive connections can only send the
3873 hello message. Also, allow bus driver to send anything to
3876 * bus/connection.c (bus_connection_complete): create the
3877 BusClientPolicy here instead of on-demand.
3878 (bus_connection_get_policy): don't return an error
3880 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3881 sender field in message being replied to
3883 * bus/bus.c (bus_context_check_security_policy): fix silly typo
3884 causing it to return FALSE always
3886 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3887 we checked sender rather than destination
3889 2003-04-25 Havoc Pennington <hp@redhat.com>
3891 test suite is slightly hosed at the moment, will fix soon
3893 * bus/connection.c (bus_connections_expire_incomplete): fix to
3894 properly disable the timeout when required
3895 (bus_connection_set_name): check whether we can remove incomplete
3896 connections timeout after we complete each connection.
3898 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3899 probably still broken.
3901 * bus/services.c (bus_registry_acquire_service): implement max
3902 number of services owned, and honor allow/deny rules on which
3903 services a connection can own.
3905 * bus/connection.c (bus_connection_get_policy): report errors here
3907 * bus/activation.c: implement limit on number of pending
3910 2003-04-25 Havoc Pennington <hp@redhat.com>
3912 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3913 where we used >= 0 instead of != DBUS_UID_UNSET.
3915 2003-04-25 Havoc Pennington <hp@redhat.com>
3917 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3918 were toggled without add/remove, fix from Anders Gustafsson
3920 2003-04-24 Havoc Pennington <hp@redhat.com>
3922 * test/data/valid-config-files/basic.conf: add <limit> tags to
3925 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3926 <limit> tag in configuration file.
3928 2003-04-24 Havoc Pennington <hp@redhat.com>
3930 * bus/dispatch.c: somehow missed some name_is
3932 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3933 (_dbus_timeout_set_interval): new
3935 * bus/connection.c (bus_connections_setup_connection): record time
3936 when each connection is first set up, and expire them after the
3937 auth timeout passes.
3939 2003-04-24 Havoc Pennington <hp@redhat.com>
3941 * dbus/dbus-message.c (dbus_message_name_is): rename
3942 (dbus_message_service_is): rename
3943 (dbus_message_sender_is): rename
3944 (dbus_message_get_service): rename
3946 2003-04-24 Havoc Pennington <hp@redhat.com>
3948 * configure.in: add --enable-checks
3950 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
3952 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
3953 to use thread locks.
3954 (_dbus_connection_handler_destroyed_locked): move some private
3955 functions into proper docs group
3957 * dbus/dbus-internals.h: add _dbus_return_if_fail,
3958 _dbus_return_val_if_fail
3960 Throughout: use dbus_return_if_fail
3962 2003-04-23 James Willcox <jwillcox@gnome.org>
3965 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
3966 (dbus_connection_setup_with_g_main),
3967 (dbus_server_setup_with_g_main):
3968 * glib/test-dbus-glib.c: (main):
3969 * glib/test-thread-client.c: (main):
3970 * glib/test-thread-server.c: (new_connection_callback), (main):
3971 * tools/dbus-monitor.c: (main):
3973 Added a GMainContext argument to dbus_connection_setup_with_g_main()
3974 and dbus_server_setup_with_g_main().
3976 2003-04-20 Havoc Pennington <hp@pobox.com>
3978 * doc/dbus-specification.sgml: document the restrictions on
3979 message and service names
3981 2003-04-22 Havoc Pennington <hp@redhat.com>
3983 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3984 support, and do some code cleanups to share more code and
3985 speed up array marshal/demarshal.
3987 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3989 * configure.in: generate dbus-arch-deps.h
3991 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3994 2003-04-22 Havoc Pennington <hp@redhat.com>
3996 * test/data/valid-messages/opposite-endian.message: fix test
3997 to use proper type for rply field
3999 * test/data/invalid-messages: add tests for below validation
4001 * dbus/dbus-message.c (decode_header_data): validate field types,
4002 and validate that named fields are valid names
4003 (decode_name_field): consider messages in the
4004 org.freedesktop.Local. namespace to be invalid.
4006 * dbus/dbus-string.c (_dbus_string_validate_name): new
4008 2003-04-19 Havoc Pennington <hp@pobox.com>
4010 * bus/driver.c (bus_driver_handle_hello): check limits and
4011 return an error if they are exceeded.
4013 * bus/connection.c: maintain separate lists of active and inactive
4014 connections, and a count of each. Maintain count of completed
4015 connections per user. Implement code to check connection limits.
4017 * dbus/dbus-list.c (_dbus_list_unlink): export
4019 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
4020 number of bytes in the message queue for a connection
4022 2003-04-18 Havoc Pennington <hp@pobox.com>
4024 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
4026 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
4029 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
4030 on realloc be sure to update the pointer in the keyring
4032 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
4033 offset to avoid writing to unallocated memory
4035 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
4036 try the next mechanism, so we properly handle OOM
4038 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
4040 (_dbus_keyring_new): fix OOM bug
4041 (_dbus_keyring_new_homedir): always set error; impose a maximum
4042 number of keys we'll load from the file, mostly to speed up the
4043 test suite and make its OOM checks more useful, but also for
4046 * dbus/dbus-auth.c (process_error_server): reject authentication
4047 if we get an error from the client
4048 (process_cancel): on cancel, send REJECTED, per the spec
4049 (process_error_client): send CANCEL if we get an error from the
4052 2003-04-18 Havoc Pennington <hp@pobox.com>
4054 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
4057 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
4060 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
4061 about DBUS_TEST_HOMEDIR once
4063 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
4066 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
4067 config file so we test the right thing
4069 Throughout: assorted docs improvements
4071 2003-04-18 Havoc Pennington <hp@pobox.com>
4073 * glib/dbus-gmain.c: adapt to watch changes
4075 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
4077 * dbus/dbus-server.h: remove dbus_server_handle_watch
4079 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
4081 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
4082 like DBusTimeout, so we don't need dbus_connection_handle_watch
4085 2003-04-17 Havoc Pennington <hp@redhat.com>
4087 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
4088 database usage so it all goes via the DBusUserDatabase cache.
4090 2003-04-17 Havoc Pennington <hp@redhat.com>
4092 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
4093 there was an OOM watch we skipped, we always return TRUE so we
4094 iterate again to have a look at it again. Fixes test suite hang.
4095 Code rearrangement also lets us lose some memset and only iterate
4096 over callbacks once.
4098 * bus/driver.c (bus_driver_handle_message): sense of test for
4101 2003-04-16 Havoc Pennington <hp@pobox.com>
4103 * doc/dbus-specification.sgml: make spec say serials are unsigned
4105 * dbus/dbus-message.h: change message serials to unsigned
4107 * dbus/dbus-connection.c: adapt to message serials being unsigned
4109 2003-04-15 Havoc Pennington <hp@pobox.com>
4111 * bus/bus.c: create and keep around a shared DBusUserDatabase
4114 * bus/connection.c (bus_connection_get_groups): don't cache
4115 groups for user in the connection object, since user database
4116 object now does that.
4118 2003-04-16 Havoc Pennington <hp@redhat.com>
4120 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
4121 list of size counters
4122 (_dbus_message_loader_putback_message_link): put back a popped link
4124 * dbus/dbus-connection.c
4125 (dbus_connection_set_max_live_messages_size): rename
4127 (dbus_connection_get_outgoing_size): get size of outgoing
4129 (_dbus_connection_set_connection_counter): remove this cruft
4131 2003-04-14 Havoc Pennington <hp@redhat.com>
4133 * dbus/dbus-userdb.c: user database abstraction, mostly to get
4134 caching, but at some point we might want to be able to use a
4137 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
4138 SHA1 conf file to test the sha1 auth mechanism, since the regular
4139 test always uses EXTERNAL when available.
4142 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
4143 add conf file that requires use of sha1 auth
4145 2003-04-13 Havoc Pennington <hp@pobox.com>
4147 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
4148 from Philip Blundell to send messages and monitor them.
4150 2003-04-13 Havoc Pennington <hp@pobox.com>
4152 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
4155 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
4158 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
4159 fix to only recover unused bytes if we're already authenticated
4160 (_dbus_transport_get_is_authenticated): fix to still mark us
4161 authenticated if there are unused bytes.
4163 * bus/dispatch.c: implement security policy checking
4165 * bus/connection.c (bus_transaction_send_from_driver): new
4167 * bus/bus.c (bus_context_check_security_policy): new
4169 * bus/dispatch.c (send_service_nonexistent_error): delete this,
4170 now we just set the DBusError and it gets converted to an error
4173 * bus/connection.c (allow_user_function): enable code using actual
4174 data from the config file
4176 * bus/policy.c (list_allows_user): handle wildcard rules for
4177 user/group connection perms
4179 2003-04-13 Havoc Pennington <hp@pobox.com>
4181 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
4183 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
4185 * bus/policy.c (bus_policy_append_mandatory_rule)
4186 (bus_policy_append_default_rule, bus_policy_append_user_rule)
4187 (bus_policy_append_group_rule): new functions
4189 2003-04-12 Havoc Pennington <hp@pobox.com>
4191 * bus/config-parser.c (bus_config_parser_new): fix a memleak
4193 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
4194 the pid/gid/uid, just for paranoia.
4196 * test/break-loader.c (randomly_do_n_things): find a byte
4197 containing a type code, and randomly change it to a different
4200 2003-04-12 Havoc Pennington <hp@pobox.com>
4202 * bus/policy.h: change BusPolicy to be the thing from the config
4203 file, and rename old BusPolicy to BusClientPolicy
4205 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
4206 match change in how policy works
4208 * dbus/dbus-internals.h: mark assert_not_reached as
4209 __attribute((noreturn))__
4211 2003-04-11 Havoc Pennington <hp@redhat.com>
4213 * doc/dbus-specification.sgml: fix a spot with the wrong name for
4214 the broadcast service. Use boolean return for ServiceExists.
4216 2003-04-11 Havoc Pennington <hp@redhat.com>
4218 * configure.in: add another directory to look for qt in.
4220 2003-04-11 Havoc Pennington <hp@redhat.com>
4222 * AUTHORS: add Colin Walters
4224 2003-04-11 Havoc Pennington <hp@redhat.com>
4230 2003-04-11 Havoc Pennington <hp@redhat.com>
4232 * bus/messagebus.in: remove pid file when stopping the
4233 message bus, since the bus won't have privileges to remove it
4236 2003-04-11 Havoc Pennington <hp@redhat.com>
4238 * bus/bus.c (bus_context_new): move credentials change after
4241 2003-04-11 Havoc Pennington <hp@pobox.com>
4243 * test/decode-gcov.c: add "below average functions" to the
4244 coverage report, and change how some of the code works.
4246 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
4247 not in the coverage stats.
4249 * test/test-service.c (main): use _dbus_verbose not fprintf in a
4250 couple places so running the test suite doesn't result in megaspam.
4252 2003-04-11 Havoc Pennington <hp@pobox.com>
4254 * bus/dispatch.c (check_existent_service_activation): accept a no
4255 memory error in a place we didn't before
4257 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
4258 in case the first one failed," since the test suite is less
4261 2003-04-10 Havoc Pennington <hp@pobox.com>
4263 * bus/dispatch.c (check_segfault_service_activation): add test
4264 for launching an executable that just crashes.
4266 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
4267 don't leave a million cores. We'll see how portable this is.
4269 2003-04-10 Havoc Pennington <hp@pobox.com>
4271 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
4272 the possible parent failures before we fork, so that we don't
4273 fail to create a babysitter after creating the child.
4275 * bus/activation.c (bus_activation_activate_service): kill child
4276 if we don't successfully complete the activation.
4278 2003-04-10 Havoc Pennington <hp@redhat.com>
4280 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
4281 the connection if it's disconnected
4283 * bus/activation.c (bus_activation_service_created): use new
4284 transaction features to roll back removal of pending activation if
4285 we don't successfully create the service after all. Don't remove
4286 pending activation if the function fails.
4288 * dbus/dbus-list.c (_dbus_list_insert_before_link)
4289 (_dbus_list_insert_after_link): new code to facilitate
4292 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
4293 new functionality, so we can preallocate the ability to insert
4296 * bus/connection.c (bus_transaction_add_cancel_hook): new function
4297 allowing us to put custom hooks in a transaction to be used for
4298 cancelling said transaction
4300 * doc/dbus-specification.sgml: add some discussion of secondary
4301 service owners, and disallow zero-length service names
4303 * bus/services.c (bus_registry_acquire_service): new function,
4304 splits out part of bus_driver_handle_acquire_service() and fixes
4305 a bug where we didn't remove the service doing the acquiring
4306 from the secondary queue if we failed to remove the current owner
4307 from the front of the queue.
4309 2003-04-10 Alexander Larsson <alexl@redhat.com>
4311 * doc/dbus-specification.sgml:
4312 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
4314 2003-04-10 Alexander Larsson <alexl@redhat.com>
4319 Added files to cvsignore
4321 * dbus/dbus-message.h:
4322 * dbus/dbus-message.c: (dbus_message_iter_get_named):
4323 Make get_named() take two out argument and return a boolean.
4324 (dbus_message_iter_get_args_valist):
4325 Update usage of get_named().
4326 (dbus_message_iter_append_byte):
4328 (dbus_message_iter_append_named)
4330 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
4333 2003-04-10 Alexander Larsson <alexl@redhat.com>
4335 * dbus/dbus-marshal.[ch]:
4336 Add array_type_pos argument to _dbus_marshal_validate_arg.
4337 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
4339 * dbus/dbus-message.[ch]:
4340 Multi-dimensional arrays have full type specification in the
4341 outermost array. Iter code re-arranged to handle this.
4342 Added some more iter tests.
4344 * doc/dbus-specification.sgml:
4347 Update new array encoding description.
4348 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
4350 * test/data/invalid-messages/array-with-mixed-types.message:
4351 * test/data/valid-messages/array-of-array-of-uint32.message:
4352 Change to the new array format.
4354 * test/data/invalid-messages/too-short-dict.message:
4357 * test/data/valid-messages/recursive-types.message:
4358 Fix up and extend test.
4360 2003-04-10 Havoc Pennington <hp@pobox.com>
4362 * bus/dispatch.c: lots of fixes
4364 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
4365 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
4366 that was crack, broke the test service.
4368 * dbus/dbus-transport.c (_dbus_transport_open): fix error
4369 handling to avoid piling up errors if we get a failure on the
4372 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
4373 pid in assertion failures.
4375 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
4376 to some fixed size of file descriptor array. Don't return TRUE
4377 anytime a timeout exists, that led to lots of busy loop silliness
4380 2003-04-09 Havoc Pennington <hp@redhat.com>
4382 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
4383 I'd checked this in earlier but hadn't.
4385 2003-04-09 Havoc Pennington <hp@redhat.com>
4387 * bus/dispatch.c (bus_dispatch_test): get a bit further through
4388 the activation test (man this is getting old!)
4390 2003-04-09 Havoc Pennington <hp@redhat.com>
4392 * test/test-utils.c: use dispatch status function to fix this up
4394 * bus/connection.c (connection_watch_callback): don't dispatch
4396 (connection_timeout_callback): don't dispatch from here
4397 (bus_connections_setup_connection): set the dispatch status function
4398 (bus_connection_disconnected): unset it
4400 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
4401 used to add a connection to be dispatched
4402 (_dbus_loop_iterate): do the dispatching at the end of each
4405 * dbus/dbus-connection.c
4406 (dbus_connection_set_dispatch_status_function): new function
4407 allowing us to fix up main loop usage
4408 (_dbus_connection_last_unref): free all the various function
4410 (dbus_connection_dispatch): call the DispatchStatusFunction
4411 whenever this function returns
4412 (dbus_connection_handle_watch): call DispatchStatusFunction
4413 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
4414 (reply_handler_timeout): call DispatchStatusFunction
4415 (dbus_connection_flush): call DispatchStatusFunction
4417 2003-04-09 Havoc Pennington <hp@redhat.com>
4419 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
4422 * bus/dispatch.c (check_service_activated): fix bug in test
4424 * dbus/dbus-mainloop.c (check_timeout): fix this up
4426 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
4427 verbose output so we can sort out output from different processes,
4428 e.g. in the activation case.
4430 2003-04-08 Colin Walters <walters@gnu.org>
4432 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
4434 (bus_context_new): Set it.
4435 (bus_context_unref): Use it to delete the pid file.
4437 2003-04-08 Havoc Pennington <hp@redhat.com>
4439 * test/data/invalid-messages/array-with-mixed-types.message:
4440 regression test that fails for the moment
4442 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
4443 tests for convenience
4445 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
4446 array of nil, it broke things.
4448 * test/data/invalid-messages/array-of-nil.message: regression test
4450 * test/data/valid-messages/array-of-array-of-uint32.message:
4451 happened to write this so added it to suite
4453 2003-04-08 Havoc Pennington <hp@redhat.com>
4455 * bus/driver.c (bus_driver_handle_acquire_service): init
4456 retval/reply before checking name
4458 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
4459 recursion depth argument
4461 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
4462 in the public struct for future extension
4464 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
4467 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
4470 * doc/dbus-specification.sgml: fix typo
4472 2003-04-08 Alexander Larsson <alexl@redhat.com>
4474 Implemented recursive types, named types and new-style iters
4477 * glib/test-thread-client.c: (thread_func):
4478 * glib/test-thread-server.c: (handle_test_message):
4479 * test/test-service.c: (handle_echo):
4488 * dbus/dbus-internals.c: (_dbus_type_to_string):
4489 Update for new types.
4491 * dbus/dbus-marshal.[ch]:
4492 Implement recursive types and the new marshalling format.
4493 Remove hardcoded dict marshalling.
4494 Marshal named types.
4496 * dbus/dbus-message-builder.c:
4498 Remove references to old types
4500 * dbus/dbus-message.[ch]:
4501 New non-refcounted iter API that supports recursive iters.
4502 Use iters for appending, including support for recursive
4504 Add byte and named type support.
4505 Update everything to new marshalling formats.
4506 Add tests for new API.
4508 * dbus/dbus-protocol.h:
4509 Remove old array types.
4510 Add types: BYTE, ARRAY, DICT, NAMED
4512 * dbus/dbus-string.c:
4513 * dbus/dbus-sysdeps.c:
4514 Make parse_double locale safe.
4516 * dbus/dbus-test-main.c:
4522 * doc/dbus-specification.sgml:
4525 * test/data/incomplete-messages/missing-body.message:
4526 * test/data/invalid-messages/bad-boolean.message:
4527 * test/data/invalid-messages/bad-boolean-array.message:
4528 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
4529 * test/data/invalid-messages/boolean-has-no-value.message-raw:
4530 * test/data/invalid-messages/too-short-dict.message:
4531 * test/data/valid-messages/dict-simple.message:
4532 * test/data/valid-messages/dict.message:
4533 * test/data/valid-messages/emptiness.message:
4534 * test/data/valid-messages/lots-of-arguments.message:
4535 * test/data/valid-messages/no-padding.message:
4536 * test/data/valid-messages/recursive-types.message:
4537 Add missing NAME fields
4538 Fix up dicts & arrays
4540 * test/data/invalid-messages/dict-with-nil-value.message:
4541 Removed, this is not invalid anymore.
4543 * test/data/valid-messages/recursive-types.message:
4544 Add new test for deeply recursive types.
4546 2003-04-07 Havoc Pennington <hp@pobox.com>
4548 * bus/driver.c (bus_driver_handle_acquire_service): return an
4549 error if you try to acquire a service that starts with ':'
4551 2003-04-07 Havoc Pennington <hp@redhat.com>
4553 * doc/dbus-specification.sgml: require that base service names
4554 start with ':' and that the base service is created/deleted
4555 as first and last things a connection does on the bus
4557 * bus/dispatch.c (check_existent_service_activation): lots more
4558 work on the activation test; it doesn't fully pass yet...
4560 * test/test-service.c (main): fix so we don't memleak the
4561 connection to the message bus
4562 (filter_func): accept a message asking us to exit
4564 2003-04-06 Havoc Pennington <hp@pobox.com>
4566 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
4569 * configure.in: fixes to Qt detection from Colin Walters
4571 * doc/Makefile.am: Only remove generated docbook dirs if they
4572 exist, from Colin Walters
4574 * dbus/dbus-bus.c: change how we set well-known connections to
4575 NULL, so that it works if a single connection is stored in
4576 two well-known array slots.
4578 * test/Makefile.am: remove a lot of stuff that isn't immediately
4579 useful, it's in CVS history if we want it.
4581 * test/test-service.c: use dbus-mainloop instead of that
4584 2003-04-06 Havoc Pennington <hp@pobox.com>
4586 * dbus/Makefile.am: split lists of sources into stuff that goes in
4587 the library, util functions that go in the lib and are also used
4588 elsewhere, and util functions that are used in tests/daemon but
4589 don't go in the lib.
4591 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
4592 here so it can be used in test binaries also
4594 2003-04-06 Havoc Pennington <hp@pobox.com>
4596 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
4597 here in the parent process, so we can return an error if it
4598 fails. Also, move some of the code into the child so the parent
4599 is less hosed if we fail midway through.
4601 * bus/bus.c (bus_context_new): move pidfile detection further up
4602 in the function, before we start overwriting sockets and such.
4604 * bus/messagebus.in: adjust this a bit, not sure if it will work.
4606 * configure.in: add --with-system-pid-file and --with-system-socket
4608 2003-04-06 Colin Walters <walters@verbum.org>
4610 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
4612 * bus/system.conf.in: Declare a pidfile.
4614 * bus/bus.c (bus_context_new): Test for an existing pid file, and
4615 create one (if appropriate).
4617 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
4618 (struct BusConfigParser) [pidfile]: New.
4619 (element_type_to_name, merge_included, start_busconfig_child)
4620 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
4621 (bus_config_parser_unref): Free it.
4622 (bus_config_parser_get_pidfile): New function.
4624 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
4626 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
4628 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
4630 * dbus/dbus-sysdeps.h: Prototype it.
4632 2003-04-06 Havoc Pennington <hp@pobox.com>
4634 * bus/bus.c (bus_context_new): print the address in here, rather
4635 than in main(), because we need to do it before forking the daemon
4637 * bus/dispatch.c (send_service_nonexistent_error): set the sender
4638 on the service nonexistent error
4640 * bus/driver.c (bus_driver_handle_acquire_service): set the
4641 sender on the AcquireService reply
4643 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
4644 server also listen on a UNIX socket so services can connect to it.
4646 2003-04-06 Havoc Pennington <hp@pobox.com>
4648 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
4649 so it detects deadlocks and also we actually init threads when
4652 2003-04-06 Havoc Pennington <hp@pobox.com>
4654 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4655 save the domain socket name, and unlink it when we disconnect the
4656 server. Means that at least when we exit normally, we won't leave
4657 a bunch of junk in /tmp
4659 * dbus/dbus-transport-unix.c
4660 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
4661 memory management). (I was making a real change here but then
4664 2003-04-06 Havoc Pennington <hp@pobox.com>
4666 * bus/bus.c (bus_context_new): fix wrong handling of
4667 server_data_slot_unref() in the error case.
4669 * dbus/dbus-internals.h (_dbus_assert): change so it passes
4670 "(condition) != 0" to _dbus_real_assert so that
4671 "_dbus_assert (pointer)" doesn't cause a warning
4673 * bus/main.c (main): accept --print-address option to print out
4674 the message bus address
4676 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
4678 * dbus/dbus-transport.c (_dbus_transport_open): special error for
4679 "tmpdir" option to unix: address on client side
4681 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
4684 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
4685 we can use to create sockets in the test suite.
4687 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
4688 cleanly. To be used for testing.
4690 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
4692 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
4694 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4695 handle trying to call this when there's no servers active
4697 2003-04-05 Havoc Pennington <hp@pobox.com>
4703 2003-04-05 Havoc Pennington <hp@pobox.com>
4705 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
4706 crash on startup. Need to get "try starting the daemon"
4707 in the test suite I guess. ;-)
4709 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4710 tracked the number of open connections; it's better done in
4711 application-specific code as you want it to span all servers etc.
4713 2003-04-05 Havoc Pennington <hp@pobox.com>
4715 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4716 patch from Colin Walters
4718 2003-04-05 Havoc Pennington <hp@pobox.com>
4720 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4721 reality; in fact multiple mechanisms are allowed.
4723 * dbus/dbus-internals.c (_dbus_real_assert)
4724 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4725 _dbus_assert_not_reached() into functions, so that they don't show
4726 up in basic block counts for test coverage, and don't use up as
4727 much disk space. Does mean slower execution speed though, so
4728 assumes --disable-asserts is the normal production case.
4730 2003-04-05 Havoc Pennington <hp@pobox.com>
4732 * test/Makefile.am (dist-hook): also dist *.in files
4738 2003-04-05 Havoc Pennington <hp@pobox.com>
4740 * dbus/dbus-string.c: docs warning
4742 * dbus/dbus-spawn.c: missing docs
4744 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4746 2003-04-05 Havoc Pennington <hp@pobox.com>
4748 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4751 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4752 to -1 once we've reaped the babysitter
4753 (_dbus_babysitter_handle_watch): do as much work as we can, not
4756 * bus/activation.c: add code using DBusBabysitter so that we
4757 handle it when a service fails to start up properly.
4758 (bus_activation_service_created): don't remove the activation
4759 entries as we go, just let them get removed when we free the pending
4760 activation. Unref reply messages after sending them.
4762 2003-04-05 Havoc Pennington <hp@pobox.com>
4764 * test/decode-gcov.c (main): print per-directory stats in the report
4766 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4768 2003-04-05 Havoc Pennington <hp@pobox.com>
4770 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4772 * test/decode-gcov.c: hack up a little program to suck data
4773 out of gcov files. Yes this is sort of silly.
4775 * configure.in: define something in config.h and do an
4776 AM_CONDITIONAL when gcov is enabled
4778 2003-04-04 Havoc Pennington <hp@redhat.com>
4780 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4781 return a "babysitter" object that is used to monitor the status of
4782 the spawned process and reap it when required.
4784 * test/test-segfault.c, test/test-exit.c,
4785 test/test-sleep-forever.c: binaries that do various lame things,
4786 used in the test suite.
4788 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4790 2003-04-03 Havoc Pennington <hp@pobox.com>
4792 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4793 in preparation for modifying it, dbus-sysdeps is getting
4796 2003-04-03 Havoc Pennington <hp@redhat.com>
4798 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4801 * bus/*.[hc]: adapt to mainloop change
4803 2003-04-03 Havoc Pennington <hp@redhat.com>
4805 * bus/activation.c (load_directory): fix up memleaks
4806 (bus_activation_entry_free): free the entry
4808 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4809 we get one from the message bus; fix memleaks.
4811 * dbus/dbus-message.c (dbus_set_error_from_message): new function
4813 2003-04-03 Havoc Pennington <hp@pobox.com>
4815 * bus/config-parser.c (bus_config_parser_unref): free
4816 list of mechanisms, bug discovered by test suite enhancements
4817 (putting system.conf and session.conf into suite)
4819 * test/Makefile.am, test/test-service.c: add placeholder for a
4820 test service that we'll activate as part of test suite. Doesn't
4823 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4824 setting NULL value, and use system malloc not dbus_malloc()
4825 when we have unavoidable memleakage.
4827 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4828 didn't work, and support DBUS_BUS_ACTIVATION.
4830 * bus/activation.c (child_setup): pass our well-known bus type to
4833 * bus/config-parser.c: support <type> to specify well-known type
4835 * doc/dbus-specification.sgml: document the env variables to
4836 locate well-known buses and find service activator
4838 2003-04-02 Havoc Pennington <hp@redhat.com>
4840 * test/Makefile.am (all-local): add a rule to copy tests to
4841 builddir, so we can have generated tests. Use this to remove the
4842 silly hack for testing system.conf and session.conf. Will use this
4843 shortly to generate .service files pointing to test binaries.
4845 2003-04-02 Havoc Pennington <hp@redhat.com>
4847 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4848 current alloc and needed new length, not max of the doubled
4849 allocation and needed new length. Also, when building tests,
4850 don't do the double-allocation stuff, just realloc every time.
4852 2003-04-02 Havoc Pennington <hp@redhat.com>
4854 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4856 (_dbus_string_get_dirname): new
4857 (_dbus_sysdeps_test): new
4858 (_dbus_directory_open): include dirnames in error messages
4860 * bus/config-parser.c: interpret <include> and <includedir> and
4861 <servicedir> relative to config file location if the given
4862 filename is not absolute.
4864 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4866 2003-04-02 Havoc Pennington <hp@redhat.com>
4868 * bus/connection.c (bus_transaction_send_error_reply): set sender
4869 service for the error, and unref the reply on success
4871 * bus/activation.c: convert to use BusTransaction so OOM can be
4873 (bus_activation_service_created): set sender of the message
4875 2003-04-01 Havoc Pennington <hp@redhat.com>
4877 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4878 <includedir> (at least mostly)
4880 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4881 first, then the user ID
4883 2003-04-01 Havoc Pennington <hp@pobox.com>
4885 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4888 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4890 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4892 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4893 socket 0777, and unlink any existing socket.
4895 * bus/bus.c (bus_context_new): change our UID/GID and fork if
4896 the configuration file so specifies; set up auth mechanism
4899 * bus/config-parser.c (bus_config_parser_content): add support
4900 for <fork> option and fill in code for <auth>
4902 * bus/system.conf.in: add <fork/> to default configuration,
4903 and limit auth mechanisms to EXTERNAL
4905 * doc/config-file.txt (Elements): add <fork>
4907 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4908 (_dbus_change_identity): new function
4910 2003-03-31 Havoc Pennington <hp@redhat.com>
4912 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4913 (_dbus_listen_unix_socket): fix off-by-one error in null
4914 termination spotted by Nalin
4916 2003-03-31 Havoc Pennington <hp@redhat.com>
4918 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4919 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4920 having a real home directory available.
4922 2003-03-31 Havoc Pennington <hp@redhat.com>
4924 * bus/Makefile.am (install-data-hook): create /var/run/dbus
4926 * bus/messagebus.in: add init script for Red Hat /etc/init.d
4928 * configure.in: add support for specifying a style of init script
4931 2003-03-31 Havoc Pennington <hp@redhat.com>
4933 Fix some annoying DBusString API and fix all affected code.
4935 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4937 (_dbus_string_get_data): change to return string instead of using
4939 (_dbus_string_get_const_data): ditto
4940 (_dbus_string_get_data_len): ditto
4941 (_dbus_string_get_const_data_len): ditto
4943 2003-03-31 Havoc Pennington <hp@redhat.com>
4945 * bus/main.c (main): fix up the command line arguments to be nicer
4947 2003-03-31 Havoc Pennington <hp@redhat.com>
4949 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
4950 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
4951 final location that lands in the config file
4953 * bus/config-loader-expat.c (bus_config_load): fix type of
4956 * doc/TODO: remove TODO item for dbus_bus_get()
4958 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
4960 2003-03-31 Havoc Pennington <hp@pobox.com>
4962 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
4963 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
4964 argument since they are always client side
4966 * dbus/dbus-server.c (dbus_server_get_address): new function
4968 * bus/main.c (main): take the configuration file as an argument.
4970 * test/data/valid-config-files/debug-allow-all.conf: new file to
4971 use with dispatch.c tests for example
4973 * bus/test-main.c (main): require test data dir
4975 * bus/bus.c (bus_context_new): change this to take a
4976 configuration file name as argument
4978 * doc/config-file.txt (Elements): add <servicedir>
4980 * bus/system.conf, bus/session.conf: new files
4982 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4983 well-known socket if none set
4985 * configure.in: create system.conf and session.conf
4987 2003-03-30 Havoc Pennington <hp@pobox.com>
4989 * bus/config-parser.c: hacking
4991 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4992 to shut down, since it could cause weirdness with the DBusList
4995 * dbus/dbus-list.c (_dbus_list_test): add tests for the
4996 link-oriented stack routines
4997 (alloc_link): free the mempool if the first alloc from it fails
4999 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
5001 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
5003 (_dbus_string_skip_white): new
5005 * doc/config-file.txt (Elements): add <includedir>
5007 2003-03-28 Havoc Pennington <hp@pobox.com>
5009 * dbus/dbus-string.c (_dbus_string_copy_data_len)
5010 (_dbus_string_copy_data): new functions
5012 2003-03-28 Anders Carlsson <andersca@codefactory.se>
5014 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
5018 * dbus/dbus-memory.c:
5021 2003-03-28 Havoc Pennington <hp@pobox.com>
5023 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
5024 I think it may have just been superstition. Not sure.
5026 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
5027 failures that were not being handled.
5029 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
5031 * dbus/dbus-memory.c: add ability to set number of mallocs in a
5032 row that will fail on out-of-memory.
5034 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
5035 function for testing out-of-memory handling.
5037 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
5038 allocation functions, they do map exactly to the expat ones.
5040 2003-03-27 Havoc Pennington <hp@redhat.com>
5042 * bus/config-loader-libxml.c (bus_config_load): add another error
5045 2003-03-26 Anders Carlsson <andersca@codefactory.se>
5048 Add note about automatic service activation.
5050 * doc/dbus-specification.sgml:
5051 Rename the specification and clarify a few things.
5053 2003-03-26 Anders Carlsson <andersca@codefactory.se>
5056 * dbus/dbus-address.c:
5058 * dbus/dbus-marshal.c:
5059 * dbus/dbus-server-debug-pipe.c:
5060 * dbus/dbus-transport-unix.c:
5061 Fix documentation warnings.
5063 2003-03-26 Havoc Pennington <hp@pobox.com>
5065 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
5066 after every test so it's quick and easy to see which leaked, and
5067 so we test multiple dbus_shutdown() calls
5069 * configure.in: change configure.in XML stuff to also support
5072 * config-loader-libxml.c: some hacking
5074 * config-loader-expat.c: some hacking
5076 * config-parser.c: some hacking, plus tests
5078 2003-03-25 Havoc Pennington <hp@redhat.com>
5080 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
5082 * configure.in: add --with-xml option to specify XML library,
5083 right now only libxml is supported.
5085 * bus/config-loader-libxml.c, config-parser.c: sync some minor
5086 nonworking code between home and work, still just stubs
5088 2003-03-24 Havoc Pennington <hp@redhat.com>
5090 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
5093 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
5094 NULL argument for "message" if the error is a well-known one,
5095 fill in a generic message in this case.
5097 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
5100 * bus/test.c (bus_test_flush_bus): add
5102 * bus/policy.c (bus_policy_test): test code stub
5104 2003-03-24 Havoc Pennington <hp@pobox.com>
5106 * bus/connection.c (bus_connections_setup_connection): set up
5107 the "can this user connect" function, but it always returns
5108 TRUE until we have a config file parser so we can have a config
5109 file that allows connections.
5111 2003-03-23 Havoc Pennington <hp@pobox.com>
5113 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
5114 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
5115 the mutex, so we can check for proper memory management
5118 * dbus/dbus-dataslot.c: remove the mutex from
5119 DBusDataSlotAllocator and lock it manually when using it,
5120 to simplify fitting it into the global slots framework.
5122 * dbus/dbus-threads.c (init_static_locks): rework how we're
5123 handling global locks so they are easily shut down.
5125 * bus/policy.c (bus_policy_append_rule): fix
5127 * bus/test-main.c (main): check for memleaks
5129 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
5130 test suite check for memleaks
5132 * dbus/dbus-memory.c: add support in test mode for tracking
5133 number of outstanding blocks
5135 2003-03-23 Havoc Pennington <hp@pobox.com>
5137 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
5140 * dbus/dbus-hash.h: add ULONG hash keys
5142 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
5143 (_dbus_get_group_id): new function
5145 2003-03-20 Havoc Pennington <hp@redhat.com>
5147 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
5149 (dbus_connection_get_unix_user): new function
5151 2003-03-20 Havoc Pennington <hp@pobox.com>
5153 * bus/connection.c (bus_connection_send_oom_error): assert that
5154 message has a sender
5155 (connection_execute_transaction): ditto
5156 (bus_connection_preallocate_oom_error): fix to set the sender, and
5157 set recipient to the destination service, not the bus driver
5159 * bus/policy.c: hacking
5161 * dbus/dbus-message.c (dbus_message_service_is): new function
5162 (dbus_message_sender_is): new
5164 2003-03-19 Havoc Pennington <hp@redhat.com>
5166 * bus/policy.c: start sketching code for policy restrictions on
5167 what connections can do.
5169 2003-03-18 Havoc Pennington <hp@redhat.com>
5171 * doc/TODO: some notes on high-level todo items. Little nitpick
5172 stuff is all in @todo, so no need to add it here.
5174 * doc/config-file.txt: some notes on how config file might look
5176 2003-03-18 Anders Carlsson <andersca@codefactory.se>
5182 2003-03-17 Havoc Pennington <hp@redhat.com>
5184 * dbus/dbus-internals.h: add gcc attributes so that
5185 our printf-style functions warn on bad arguments to
5188 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
5191 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
5194 2003-03-17 Havoc Pennington <hp@redhat.com>
5196 * bus/test-main.c (main): make it print something as it runs
5197 so make check doesn't look stuck
5199 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
5200 from CVS, now obsolete
5202 2003-03-17 Anders Carlsson <andersca@codefactory.se>
5204 * bus/dispatch.c: (bus_dispatch):
5205 Refetch the service name since it may have been reallocated
5206 when dbus_message_set_sender was called.
5208 * dbus/dbus-sysdeps.c: (_dbus_accept):
5209 Add address and address length variables and use them to stop
5210 valgrind from complaining.
5212 2003-03-17 Havoc Pennington <hp@pobox.com>
5214 All tests pass, no memleaks, no valgrind complaints.
5216 * bus/test.c: refcount handler_slot
5218 * bus/connection.c (bus_connections_new): refcount
5219 connection_data_slot
5221 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
5222 bytes so that auth scripts pass.
5224 * bus/dispatch.c: init message_handler_slot so it gets allocated
5227 * bus/dispatch.c (message_handler_slot_ref): fix memleak
5229 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
5230 dealloc server_pipe_hash when no longer used for benefit of
5233 * dbus/dbus-auth.c (process_command): memleak fix
5235 * bus/dispatch.c (check_hello_message): memleak fix
5237 2003-03-16 Havoc Pennington <hp@pobox.com>
5239 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
5241 2003-03-17 Anders Carlsson <andersca@codefactory.se>
5243 * bus/activation.c (bus_activation_activate_service): Append
5244 the pending activation entry to the list of pending activations.
5246 2003-03-16 Havoc Pennington <hp@pobox.com>
5248 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
5251 * dbus/dbus-address.c (create_entry): fix OOM handling when
5252 failing to alloc entry->method
5254 2003-03-16 Havoc Pennington <hp@pobox.com>
5256 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
5259 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
5260 add some missing dbus_set_result
5262 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
5263 alloc the DBusMessageHandler
5265 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
5266 the transport here, since we call this from the finalizer; it
5267 resulted in a double-finalize.
5269 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
5270 where we tried to use transport->connection that was NULL,
5271 happened when transport was disconnected early on due to OOM
5273 * bus/*.c: adapt to handle OOM for watches/timeouts
5275 * dbus/dbus-transport-unix.c: port to handle OOM during
5278 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
5279 reference to unused bytes instead of a copy
5281 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
5284 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
5287 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
5290 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5292 * doc/dbus-specification.sgml:
5293 Document reply message for ActivateService.
5295 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5297 * bus/activation.c: (bus_pending_activation_entry_free),
5298 (bus_pending_activation_free), (bus_activation_new),
5299 (bus_activation_unref), (bus_activation_service_created),
5300 (bus_activation_activate_service):
5302 * bus/bus.c: (bus_context_new):
5303 * bus/desktop-file.c: (new_section):
5304 * bus/driver.c: (bus_driver_send_service_deleted),
5305 (bus_driver_handle_activate_service):
5306 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
5308 * dbus/dbus-connection.c:
5309 (dbus_connection_send_with_reply_and_block):
5310 * dbus/dbus-message.c: (dbus_message_append_args_valist):
5311 * dbus/dbus-protocol.h:
5312 Make activation work better. Now pending activations will be queued
5313 and the daemon won't try to activate services that are already registered.
5315 2003-03-16 Havoc Pennington <hp@pobox.com>
5317 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
5320 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
5321 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
5323 2003-03-16 Havoc Pennington <hp@pobox.com>
5325 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
5326 this. always run the test suite before commit...
5328 * bus/*: adapt to DBusConnection API changes
5330 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
5331 requires renaming stuff to avoid dbus_connection_dispatch name
5334 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
5337 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
5338 separate from _dbus_message_loader_return_buffer()
5340 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
5341 this, because it's now always broken to use; the number of
5342 messages in queue vs. the number still buffered by the message
5343 loader is undefined/meaningless. Should use
5344 dbus_connection_get_dispatch_state().
5345 (dbus_connection_dispatch): rename from
5346 dbus_connection_dispatch_message
5348 2003-03-16 Havoc Pennington <hp@pobox.com>
5350 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
5353 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5355 * dbus/dbus-connection.c:
5356 (dbus_connection_send_with_reply_and_block):
5357 Decrease connection->n_incoming when removing an entry
5359 * dbus/dbus-dict.c: (dbus_dict_entry_free),
5360 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5361 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5362 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
5363 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
5364 (dbus_dict_get_byte_array):
5365 Handle NULL arrays and strings. Also add support for byte arrays.
5367 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
5368 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
5369 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5370 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5371 (_dbus_demarshal_dict), (demarshal_and_validate_len),
5372 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
5373 * dbus/dbus-marshal.h:
5374 Add support for marshalling and demarshalling empty arrays and strings.
5376 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5377 (dbus_message_append_string_array),
5378 (dbus_message_iter_get_boolean),
5379 (dbus_message_iter_get_boolean_array),
5380 (dbus_message_iter_get_int32_array),
5381 (dbus_message_iter_get_uint32_array),
5382 (dbus_message_iter_get_double_array),
5383 (dbus_message_iter_get_byte_array),
5384 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
5385 (check_message_handling):
5386 Add support for getting empty arrays and dicts.
5388 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
5389 Don't do any validation at all for now, that's better than just checking
5392 * test/data/valid-messages/emptiness.message:
5393 New test message with lots of empty arrays.
5395 2003-03-16 Havoc Pennington <hp@pobox.com>
5397 * dbus/dbus-connection.c
5398 (_dbus_connection_queue_received_message_link): new function that
5399 can't fail due to OOM
5401 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
5402 new function pops a message together with a list link
5405 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
5406 message queuing functions to avoid needing to alloc memory
5408 2003-03-16 Havoc Pennington <hp@pobox.com>
5410 Oops - test code was only testing failure of around 30 of the
5411 mallocs in the test path, but it turns out there are 500+
5412 mallocs. I believe this was due to misguided linking setup such
5413 that there was one copy of dbus_malloc etc. in the daemon and one
5414 in the shared lib, and only daemon mallocs were tested. In any
5415 case, the test case now tests all 500+ mallocs, and doesn't pass
5416 yet, though there are lots of fixes in this patch.
5418 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5419 this so that it doesn't need to allocate memory, since it
5420 has no way of indicating failure due to OOM (and would be
5421 annoying if it did).
5423 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
5425 * bus/Makefile.am: rearrange to create two self-contained
5426 libraries, to avoid having libraries with overlapping symbols.
5427 that was resulting in weirdness, e.g. I'm pretty sure there
5428 were two copies of global static variables.
5430 * dbus/dbus-internals.c: move the malloc debug stuff to
5433 * dbus/dbus-list.c (free_link): free list mempool if it becomes
5436 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
5438 * dbus/dbus-address.c (dbus_parse_address): free list nodes
5441 * bus/dispatch.c (bus_dispatch_add_connection): free
5442 message_handler_slot when no longer using it, so
5443 memory leak checkers are happy for the test suite.
5445 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
5447 * bus/bus.c (new_connection_callback): disconnect in here if
5448 bus_connections_setup_connection fails.
5450 * bus/connection.c (bus_connections_unref): fix to free the
5452 (bus_connections_setup_connection): if this fails, don't
5453 disconnect the connection, just be sure there are no side
5456 * dbus/dbus-string.c (undo_alignment): unbreak this
5458 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
5460 (_dbus_auth_new): fix the order in which we free strings
5463 * bus/connection.c (bus_connection_disconnected): fix to
5464 not send ServiceDeleted multiple times in case of memory
5467 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
5468 get the base service name
5469 (dbus_bus_register_client): don't return base service name,
5470 instead store it on the DBusConnection and have an accessor
5472 (dbus_bus_register_client): rename dbus_bus_register()
5474 * bus/dispatch.c (check_hello_message): verify that other
5475 connections on the bus also got the correct results, not
5476 just the one sending hello
5478 2003-03-15 Havoc Pennington <hp@pobox.com>
5480 Make it pass the Hello handling test including all OOM codepaths.
5481 Now to do other messages...
5483 * bus/services.c (bus_service_remove_owner): fix crash when
5484 removing owner from an empty list of owners
5485 (bus_registry_ensure): don't leave service in the list of
5486 a connection's owned services if we fail to put the service
5489 * bus/connection.c (bus_connection_preallocate_oom_error): set
5490 error flag on the OOM error.
5492 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5493 handle _dbus_transport_set_connection failure
5495 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
5496 to create watches up front and simply enable/disable them as
5498 (unix_connection_set): this can now fail on OOM
5500 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
5501 of enabling/disabling a watch or timeout.
5503 * bus/loop.c (bus_loop_iterate): don't touch disabled
5506 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
5508 2003-03-15 Havoc Pennington <hp@pobox.com>
5510 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
5511 write useful test code, after all that futzing around ;-)
5513 Test does not yet pass because we can't handle OOM in
5514 _dbus_transport_messages_pending (basically,
5515 dbus_connection_preallocate_send() does not prealloc the write
5516 watch). To fix this, I think we need to add new stuff to
5517 set_watch_functions, namely a SetEnabled function so we can alloc
5518 the watch earlier, then enable it later.
5520 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
5521 dbus-memory.c to the convenience lib
5523 * bus/test.c: rename some static functions to keep them clearly
5524 distinct from stuff in connection.c. Handle client disconnection.
5526 2003-03-14 Havoc Pennington <hp@pobox.com>
5528 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
5529 transport, tests more of the real codepath. Set up clients
5530 with bus_setup_debug_client.
5532 * bus/test.c (bus_setup_debug_client): function to set up debug
5533 "clients" on the main loop
5535 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
5538 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
5541 * dbus/dbus-server-debug.c: support a debug server based on pipes
5543 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
5544 (_dbus_close): new function
5546 * configure.in: check for socketpair
5548 2003-03-14 Havoc Pennington <hp@redhat.com>
5550 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
5553 * dbus/dbus-transport-debug.c: rework this a good bit to be
5554 less complicated. hopefully still works.
5556 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
5559 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
5562 * dbus/dbus-message.c (dbus_message_copy): rename from
5563 dbus_message_new_from_message, fix it up to copy
5564 all the message fields, add test case
5566 * bus/dispatch.c (bus_dispatch_test): add some more test code,
5567 not quite passing yet
5569 2003-03-14 Havoc Pennington <hp@pobox.com>
5571 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
5572 until no work remains" in test code. (the large diff here
5573 is just code movement, no actual changes)
5575 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
5576 1, no point waiting around for test code.
5577 (_dbus_server_debug_accept_transport): unref the timeout
5578 after adding it (right?)
5580 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
5582 2003-03-13 Havoc Pennington <hp@redhat.com>
5584 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
5587 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
5590 * dbus/dbus-connection.h: Make AddWatchFunction and
5591 AddTimeoutFunction return a bool so they can fail on out-of-memory
5593 * bus/bus.c (bus_context_new): set up timeout handlers
5595 * bus/connection.c (bus_connections_setup_connection): set up
5598 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
5601 * bus/bus.c (bus_context_new): adapt to changes
5603 * bus/connection.c: adapt to changes
5605 * test/watch.c: adapt to DBusWatch changes
5607 * bus/dispatch.c (bus_dispatch_test): started adding this but
5610 2003-03-14 Anders Carlsson <andersca@codefactory.se>
5612 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
5614 2003-03-13 Havoc Pennington <hp@pobox.com>
5616 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
5617 set up a test framework as for the library
5619 2003-03-12 Havoc Pennington <hp@pobox.com>
5621 Throughout: purge global variables, introduce BusActivation,
5622 BusConnections, BusRegistry, etc. objects instead.
5624 * bus/bus.h, bus/bus.c: introduce BusContext as a global
5627 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
5628 going to redo this a bit differently I think
5630 2003-03-12 Havoc Pennington <hp@redhat.com>
5632 Mega-patch that gets the message bus daemon initially handling
5633 out-of-memory. Work still needed. Also lots of random
5634 moving stuff to DBusError instead of ResultCode.
5636 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
5638 * dbus/dbus-connection.c
5639 (dbus_connection_send_with_reply_and_block): use DBusError
5641 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
5644 * dbus/dbus-connection.c (dbus_connection_send): drop the result
5645 code here, as the only failure possible is OOM.
5647 * bus/connection.c (bus_connection_disconnect):
5648 rename bus_connection_disconnected as it's a notification only
5650 * bus/driver.c (bus_driver_handle_acquire_service): don't free
5651 "name" on get_args failure, should be done by get_args;
5652 don't disconnect client for bad args, just return an error.
5653 (bus_driver_handle_service_exists): ditto
5655 * bus/services.c (bus_services_list): NULL-terminate returned array
5657 * bus/driver.c (bus_driver_send_service_lost)
5658 (bus_driver_send_service_acquired): send messages from driver to a
5659 specific client to the client's unique name, not to the broadcast
5662 * dbus/dbus-message.c (decode_header_data): reject messages that
5663 contain no name field
5664 (_dbus_message_get_client_serial): rename to
5665 dbus_message_get_serial and make public
5666 (_dbus_message_set_serial): rename from set_client_serial
5667 (_dbus_message_set_reply_serial): make public
5668 (_dbus_message_get_reply_serial): make public
5670 * bus/connection.c (bus_connection_foreach): allow stopping
5671 iteration by returning FALSE from foreach function.
5673 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
5674 (dbus_connection_free_preallocated_send)
5675 (dbus_connection_preallocate_send): new API for sending a message
5676 without possibility of malloc failure.
5677 (dbus_connection_send_message): rename to just
5678 dbus_connection_send (and same for whole function family)
5680 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
5682 * dbus/dbus-sysdeps.c (_dbus_exit): new function
5684 * bus/activation.c: handle/return errors
5686 * dbus/dbus-errors.h: add more DBUS_ERROR #define
5688 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
5689 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
5690 (_dbus_result_from_errno): move to this file
5692 2003-03-10 Anders Carlsson <andersca@codefactory.se>
5694 * dbus/dbus-marshal.c:
5695 (_dbus_marshal_set_string):
5696 Take a length argument so we can marshal the correct string
5699 (_dbus_marshal_dict), (_dbus_demarshal_dict),
5700 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
5701 (_dbus_marshal_test):
5702 * dbus/dbus-marshal.h:
5703 Add support for marshalling and demarshalling dicts.
5705 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5706 Add support for TYPE DICT.
5708 * dbus/dbus-message.c: (set_string_field):
5709 Adjust header padding.
5711 (dbus_message_append_args_valist), (dbus_message_append_dict),
5712 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5713 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5714 (check_message_handling), (check_have_valid_message):
5715 * dbus/dbus-message.h:
5716 Add functions for setting and getting dicts.
5718 * dbus/dbus-protocol.h:
5724 * doc/dbus-specification.sgml:
5725 Add information about how dicts are marshalled.
5727 * test/data/invalid-messages/dict-with-nil-value.message:
5728 * test/data/invalid-messages/too-short-dict.message:
5729 * test/data/valid-messages/dict-simple.message:
5730 * test/data/valid-messages/dict.message:
5731 Add sample messages containing dicts.
5733 2003-03-08 Anders Carlsson <andersca@codefactory.se>
5735 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5737 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5740 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5741 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5742 (dbus_dict_set_int32), (dbus_dict_set_uint32),
5743 (dbus_dict_set_double), (dbus_dict_set_string),
5744 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5745 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5746 (dbus_dict_set_string_array), (_dbus_dict_test):
5748 Fix according to comments from Havoc.
5750 2003-03-06 Michael Meeks <michael@server.home>
5752 * configure.in: if we don't have kde-config, disable have_qt.
5754 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5759 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5760 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5761 (dbus_dict_remove), (dbus_dict_get_value_type),
5762 (dbus_dict_get_keys), (dbus_dict_put_boolean),
5763 (dbus_dict_put_int32), (dbus_dict_put_uint32),
5764 (dbus_dict_put_double), (dbus_dict_put_string),
5765 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5766 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5767 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5768 (dbus_dict_get_int32), (dbus_dict_get_uint32),
5769 (dbus_dict_get_double), (dbus_dict_get_string),
5770 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5771 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5772 (dbus_dict_get_string_array), (_dbus_dict_test):
5774 Add DBusDict implementation
5776 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5780 2003-03-04 Havoc Pennington <hp@pobox.com>
5782 * test/data/auth/*: adapt to changes
5784 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5785 USERID_BASE64 and change USERNAME_BASE64 to put in username not
5788 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5789 more stuff from being in a context name, to make the protocol
5790 simpler to deal with
5792 * dbus/dbus-errors.c (dbus_error_has_name): new function
5793 (dbus_error_is_set): new function
5795 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5796 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5798 * dbus/dbus-connection.c (dbus_connection_flush): also read
5799 messages during a flush operation
5801 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5803 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5805 * configure.in: Check for gethostbyname on Solaris.
5807 * dbus/dbus-transport.c: (_dbus_transport_open):
5808 Remove duplicate "tcp" entry.
5810 * doc/dbus-specification.sgml:
5811 Clarify some things.
5813 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5815 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5816 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5817 (_dbus_keyring_test):
5818 * dbus/dbus-md5.c: (_dbus_md5_compute):
5819 * dbus/dbus-sha.c: (_dbus_sha_compute):
5822 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5824 * README: Add some things.
5826 2003-03-04 Anders Carlsson <andersca@codefactory.se>
5828 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5829 after case DBUS_TYPE_BOOELAN.
5831 2003-03-02 Havoc Pennington <hp@pobox.com>
5833 * test/break-loader.c (randomly_set_extreme_ints): add test that
5834 sets really huge and small integers
5836 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5837 that length of boolean array fits in the string, and that
5838 string has room for boolean value in single-bool case.
5840 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5841 optional value to "ALIGN" command which is what to fill the
5844 * test/data/valid-messages/no-padding.message: add regression
5845 test for the message padding problem
5847 2003-03-02 Havoc Pennington <hp@pobox.com>
5849 * dbus/dbus-message.c (decode_header_data): fix to always init
5850 message_padding, from Benjamin Dauvergne
5852 2003-03-02 Havoc Pennington <hp@pobox.com>
5858 2003-03-01 Joe Shaw <joe@assbarn.com>
5860 * configure.in: Check for "struct cmsgcred" and try to access its
5861 members for BSD-like unices.
5863 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5864 _dbus_read_credentials_unix_socket().
5865 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5866 read() for reading the credential byte off the unix socket. Use
5867 struct cmsgcred on systems that support it.
5869 2003-02-27 Alexander Larsson <alexl@redhat.com>
5873 Make gthreads-2.0 dependency optional. Don't build thread test if
5876 2003-02-27 Havoc Pennington <hp@pobox.com>
5878 * dbus/dbus-connection.c
5879 (dbus_connection_send_message_with_reply_and_block): fix doh!
5880 doh! doh! bug that resulted in never removing a reply from the
5881 queue, no wonder we called get_reply_serial so much ;-)
5883 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5884 and client serial instead of demarshaling them every time
5886 2003-02-27 Havoc Pennington <hp@pobox.com>
5888 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5889 more inlined, using dbus-string-private.h, speeds things up
5892 * dbus/dbus-string.c (_dbus_string_free): apply align offset
5893 when freeing the string
5894 (_dbus_string_steal_data): fix for align offset
5895 (undo_alignment): new function
5897 2003-02-26 Havoc Pennington <hp@redhat.com>
5899 All kinds of audit fixes from Owen, plus initial attempt to
5900 handle unaligned memory returned from malloc.
5902 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5903 leave room for align_offset and nul byte
5904 (fixup_alignment): function to track an align_offset and
5905 ensure real->str is aligned
5906 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5907 to allow a nul byte plus align offset
5908 (_dbus_string_lock): fix overflow issue
5909 (_dbus_string_init_const_len): add assertions on sanity of len,
5910 assign allocated to be ALLOCATION_PADDING larger than len
5911 (set_length): fixup the overflow handling
5912 (_dbus_string_get_data_len): fix overflow in assertion
5913 (open_gap): detect overflow in size of gap to be opened
5914 (_dbus_string_lengthen): add overflow check
5915 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5916 (_dbus_string_append): add overflow check
5917 (_dbus_string_append_unichar): overflow
5918 (_dbus_string_delete): fix overflow in assertion
5919 (_dbus_string_copy_len): overflow in assertion
5920 (_dbus_string_replace_len): overflows in assertions
5921 (_dbus_string_find): change to implement in terms of
5922 _dbus_string_find_to
5923 (_dbus_string_find_to): assorted fixage
5924 (_dbus_string_equal_c_str): assert c_str != NULL,
5925 fix logic so the function works
5926 (_dbus_string_ends_with_c_str): fix overflow thingy
5927 (_dbus_string_base64_encode): overflow fix
5928 (_dbus_string_validate_ascii): overflow
5929 (_dbus_string_validate_nul): overflow
5931 2003-02-26 Havoc Pennington <hp@redhat.com>
5933 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5935 2003-02-26 Alexander Larsson <alexl@redhat.com>
5938 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5940 * dbus/dbus-connection.c:
5941 * dbus/dbus-connection.h:
5942 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5943 Add dbus_connection_set_wakeup_main_function and use it when queueing
5944 incoming and outgoing messages.
5947 * dbus/dbus-dataslot.c:
5948 Threadsafe usage of DBusDataSlotAllocator
5950 * dbus/dbus-message.c: (dbus_message_get_args_iter):
5953 * dbus/dbus-server-unix.c:
5956 * glib/dbus-gmain.c:
5957 Implement the new wakeup functions for glib.
5960 * glib/test-thread-client.c:
5961 * glib/test-thread-server.c:
5962 * glib/test-thread.h:
5963 Initial cut at some thread test code. Not really done yet.
5965 2003-02-26 Havoc Pennington <hp@pobox.com>
5967 * dbus/dbus-connection.c
5968 (dbus_connection_send_message_with_reply_and_block): fix crash
5969 where we ref'd the outgoing message instead of the returned reply
5971 * dbus/dbus-transport-unix.c (do_authentication): check read watch
5972 at the end of this function, so if we didn't need to read for
5973 authentication, we reinstall it for receiving messages
5975 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5976 a NULL sender for peer-to-peer case
5978 * dbus/dbus-transport-unix.c (check_read_watch): handle
5979 !authenticated case correctly
5981 * glib/dbus-gmain.c: add support for DBusServer
5983 * dbus/dbus-server.c: add data slot support
5985 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5986 return values and handle errors
5988 * dbus/dbus-dataslot.c: factor out the data slot stuff from
5991 * Doxyfile.in (INPUT): add glib subdir
5993 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5994 setup_with_g_main instead of hookup_with_g_main; write docs
5996 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5998 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5999 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6000 * dbus/dbus-message.c: (dbus_message_append_boolean),
6001 (dbus_message_append_boolean_array),
6002 (dbus_message_get_args_valist), (_dbus_message_test):
6003 * dbus/dbus-message.h:
6004 * doc/dbus-specification.sgml:
6005 Various fixes as pointed out by Havoc.
6007 * test/data/invalid-messages/bad-boolean-array.message:
6008 * test/data/invalid-messages/bad-boolean.message:
6009 Add invalid boolean value test cases.
6011 2003-02-24 Anders Carlsson <andersca@codefactory.se>
6013 * dbus/dbus-internals.c: (_dbus_type_to_string):
6014 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6015 (_dbus_marshal_validate_arg):
6016 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6017 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6018 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
6019 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
6020 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
6021 (dbus_message_iter_get_double),
6022 (dbus_message_iter_get_boolean_array), (message_iter_test):
6023 * dbus/dbus-message.h:
6024 * dbus/dbus-protocol.h:
6025 * doc/dbus-specification.sgml:
6026 * test/data/valid-messages/lots-of-arguments.message:
6027 Add support for boolean and boolean array types.
6029 2003-02-23 Havoc Pennington <hp@pobox.com>
6031 * dbus/dbus-keyring.c: finish most of this implementation and
6034 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
6035 these barf if the error isn't cleared to NULL
6037 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
6038 (_dbus_create_directory): new function
6040 * dbus/dbus-errors.c (dbus_set_error): fix warning
6042 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
6043 (_dbus_string_hex_decode): new function
6044 (test_hex_roundtrip): test code
6046 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
6048 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
6050 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
6051 the save-to-temp/rename trick to atomically write the new file
6052 (_dbus_string_parse_uint): new function
6054 2003-02-22 Havoc Pennington <hp@pobox.com>
6056 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
6058 2003-02-22 Havoc Pennington <hp@pobox.com>
6060 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
6061 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
6063 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
6065 * dbus/test/data/sha-1: add US government test suite for SHA-1
6067 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6069 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6070 Make string arrays NULL-terminated.
6072 * dbus/dbus-memory.c: (dbus_free_string_array):
6073 * dbus/dbus-memory.h:
6074 New function for freeing NULL-terminated string arrays.
6076 * dbus/dbus-message-builder.c: (append_quoted_string),
6077 (_dbus_message_data_load):
6078 Add support for array types.
6080 * dbus/dbus-message.c: (check_message_handling):
6081 Add more types as test cases.
6083 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
6084 (_dbus_string_parse_double):
6085 Add the start offset to the end offset.
6087 * test/data/valid-messages/lots-of-arguments.message:
6088 New test message with lots of arguments.
6090 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6092 * dbus/dbus-message.c: (dbus_message_append_nil),
6093 (dbus_message_append_int32), (dbus_message_append_uint32),
6094 (dbus_message_append_double), (dbus_message_append_string),
6095 (dbus_message_append_int32_array),
6096 (dbus_message_append_uint32_array),
6097 (dbus_message_append_double_array),
6098 (dbus_message_append_byte_array),
6099 (dbus_message_append_string_array):
6100 Fix all out-of-memory handling in these functions.
6102 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6104 * dbus/dbus-message.c: (dbus_message_append_nil):
6107 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6109 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6110 (dbus_message_append_nil), (dbus_message_append_int32_array),
6111 (dbus_message_append_uint32_array),
6112 (dbus_message_append_double_array),
6113 (dbus_message_append_byte_array),
6114 (dbus_message_append_string_array), (dbus_message_get_args_valist),
6115 (dbus_message_iter_get_int32_array),
6116 (dbus_message_iter_get_uint32_array),
6117 (dbus_message_iter_get_double_array),
6118 (dbus_message_iter_get_byte_array),
6119 (dbus_message_iter_get_string_array):
6121 * dbus/dbus-message.h:
6122 Add functions for appending and getting arrays.
6124 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6126 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
6127 element size at least 8 bytes, fixes mempool tests on
6130 2003-02-20 Alexander Larsson <alexl@redhat.com>
6132 * dbus/dbus-transport-unix.c (unix_do_iteration):
6133 Unlock the connection mutex during a blocking select call.
6134 Add todo about how we need a way to wake up the select.
6136 * dbus/dbus-connection-internal.h:
6137 * dbus/dbus-connection.c:
6138 Add _dbus_connection_lock and _dbus_connection_unlock.
6140 2003-02-19 Havoc Pennington <hp@pobox.com>
6142 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
6143 Doxyfile.in, not Doxyfile
6145 * dbus/dbus-keyring.c: do some hacking on this
6147 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
6149 * dbus/dbus-errors.c (dbus_set_error_const): do not call
6151 (dbus_set_error): remove dbus_error_init, check for message ==
6152 NULL *before* we sprintf into it, and add @todo about including
6153 system headers in this file
6155 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
6157 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
6159 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
6160 get various bits of user information based on either username
6162 (_dbus_homedir_from_username): new function
6164 2003-02-19 Anders Carlsson <andersca@codefactory.se>
6167 Add check for nonposix getpwnam_r
6169 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
6170 Align the pool element size to a sizeof (void *) boundary.
6172 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
6173 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
6174 General Solaris fixes.
6176 * test/data/valid-messages/simplest-manual.message:
6177 Explicitly state that we want little-endian packing.
6179 2003-02-19 Mikael Hallendal <micke@codefactory.se>
6181 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
6183 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
6184 Added to create a transport connecting using a tcp/ip socket.
6186 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
6187 to a tcp socket at given host and port.
6188 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
6191 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
6193 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
6194 Added to create a server listening on a TCP/IP socket.
6196 2003-02-19 Havoc Pennington <hp@pobox.com>
6198 Throughout: mop up all the Doxygen warnings and undocumented
6201 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
6202 to search any paths.
6204 * dbus/dbus-threads.c: move global mutex initializers to
6205 dbus-internals.h, multiple prototypes was confusing doxygen
6206 besides being kind of ugly
6208 * Doxyfile (PREDEFINED): have Doxygen define
6209 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
6210 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
6211 (do not abuse the feature! it's for stuff like the autogenerated
6212 macros in dbus-md5.c, not just for things you don't feel like
6215 2003-02-18 Havoc Pennington <hp@pobox.com>
6217 * dbus/dbus-string.c (_dbus_string_zero): new function
6219 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
6220 wrap it in some dbus-friendly API
6222 * dbus/dbus-types.h: add 16-bit types
6224 2003-02-18 Joe Shaw <joe@assbarn.com>
6226 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
6227 credentials from our currently running process.
6228 (get_word): Fix a buglet where we were copying the entire length
6229 instead of relative to our position.
6231 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
6232 keys on the stack... it's 640k of data.
6234 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
6235 read the credentials byte off the socket, even if we don't have
6237 (_dbus_poll): Implement poll() using select() for systems which
6240 * glib/test-dbus-glib.c (main): Print out an error if no
6241 parameters are given.
6243 * test/data/auth/fallback.auth-script: Added. Tests that a client
6244 can fallback to a secondary auth mechanism if the first fails.
6246 2003-02-18 Havoc Pennington <hp@pobox.com>
6250 2003-02-17 Havoc Pennington <hp@pobox.com>
6252 * doc/dbus-specification.sgml: lots of cosmetic
6253 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
6254 env variable to DBUS_BUS_ADDRESS, s/client/application/,
6255 s/server/bus/ (except in authentication section). Add a section
6256 "Message Bus Message Routing"
6258 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
6264 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6266 * doc/dbus-specification.sgml:
6267 Specification updates.
6269 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6271 * bus/activation.c: (bus_activation_init), (child_setup),
6272 (bus_activation_activate_service):
6274 * bus/main.c: (main):
6275 Set DBUS_ADDRESS environment variable.
6277 * dbus/dbus-errors.c: (dbus_set_error):
6278 Don't use va_copy since that's a C99 feature.
6280 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
6281 (_dbus_spawn_async):
6282 * dbus/dbus-sysdeps.h:
6283 Add child_setup_func to _dbus_spawn_async.
6285 * doc/dbus-specification.sgml:
6286 Update specification.
6288 * test/spawn-test.c: (setup_func), (main):
6291 2003-02-17 Alexander Larsson <alexl@redhat.com>
6293 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
6296 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6300 * doc/dbus-test-plan.sgml:
6301 Add test plan document.
6306 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6308 * dbus/dbus-message.c: (decode_header_data),
6309 (_dbus_message_loader_return_buffer):
6310 Set the header padding amount when loading a message.
6312 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6314 * bus/dispatch.c: (send_one_message):
6315 Only send broadcast messages to registered connections.
6317 * dbus/dbus-message.c: (dbus_message_name_is):
6318 * dbus/dbus-message.h:
6319 New convenience function.
6321 * dbus/dbus-transport-debug.c: (do_reading):
6322 Only dispatch one message per run.
6325 * test/bus-test.c: (new_connection_callback), (die),
6326 (test_hello_client1_handler), (test_hello_client2_handler),
6327 (test_hello_replies), (main):
6329 * test/bus-test-loop.[ch]:
6332 2003-02-16 Havoc Pennington <hp@pobox.com>
6334 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6335 backward conditional
6337 2003-02-16 Alexander Larsson <alexl@redhat.com>
6339 * dbus/dbus-connection.c:
6340 Implement sent_message_with_reply. (with_reply_and block is still
6342 Made dispatch_message not lose message if OOM.
6344 * dbus/dbus-errors.h:
6345 Add NoReply error (for reply timeouts).
6347 2003-02-16 Alexander Larsson <alexl@redhat.com>
6349 * dbus/dbus-hash.c (_dbus_hash_table_unref):
6350 Actually free keys and values when destroying hashtable.
6352 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6354 * dbus/dbus-auth.c: (client_try_next_mechanism):
6357 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
6358 Return TRUE if there's no thread implementation around.
6360 * glib/dbus-gmain.c: (free_source),
6361 (dbus_connection_hookup_with_g_main):
6362 Make sure to remove the GSource when the connection is finalized.
6364 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6366 * bus/dispatch.c: (bus_dispatch_message_handler):
6367 * dbus/dbus-errors.h:
6368 Return an error if someone tries to send a message to a service
6371 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6373 * bus/activation.c: (load_directory), (bus_activation_init),
6374 (bus_activation_activate_service):
6377 (bus_driver_handle_activate_service), (bus_driver_handle_message):
6378 More work on the activation handling.
6380 * dbus/dbus-errors.h:
6381 Add some error messages
6383 * dbus/dbus-message.c: (dbus_message_new_error_reply):
6384 * dbus/dbus-message.h:
6385 New function that creates an error message.
6387 * dbus/dbus-protocol.h:
6388 Add ACTIVATE_SERVER message.
6390 * dbus/dbus-server-unix.c: (unix_handle_watch),
6391 (_dbus_server_new_for_domain_socket):
6392 Call _dbus_fd_set_close_on_exec.
6394 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
6395 (_dbus_spawn_async), (_dbus_disable_sigpipe),
6396 (_dbus_fd_set_close_on_exec):
6397 * dbus/dbus-sysdeps.h:
6398 Add _dbus_fd_set_close_on exec function. Also add function that checks
6399 that all open fds are set to close-on-exec and warns otherwise.
6401 * dbus/dbus-transport-unix.c:
6402 (_dbus_transport_new_for_domain_socket):
6403 Call _dbus_fd_set_close_on_exec.
6405 2003-02-16 Havoc Pennington <hp@pobox.com>
6407 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
6408 allow people to avoid setting SIGPIPE to SIG_IGN
6409 (_dbus_connection_new_for_transport): disable SIGPIPE unless
6410 we've been asked not to
6412 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6414 * dbus/dbus-list.c: (_dbus_list_append_link),
6415 (_dbus_list_prepend_link):
6416 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
6420 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6423 * bus/activation.c: (bus_activation_entry_free),
6424 (add_desktop_file_entry), (load_directory), (bus_activation_init):
6426 * bus/main.c: (main):
6427 Add simple activation support, doesn't work yet though.
6429 2003-02-15 Zack Rusin <zack@kde.org>
6431 * qt/dbus-qthread.cpp: small casting fix
6433 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6435 * dbus/dbus-errors.c: (dbus_set_error):
6436 * dbus/dbus-errors.h:
6437 Add a few errors and make dbus_set_error void.
6439 * dbus/dbus-sysdeps.c:
6440 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
6441 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
6442 * dbus/dbus-sysdeps.h:
6443 Add _dbus_spawn_async.
6445 * test/spawn-test.c: (main):
6446 Test for _dbus_spawn_async.
6448 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6450 * dbus/dbus-internals.h:
6451 Fix build without tests.
6453 * dbus/dbus-list.c: (alloc_link):
6454 Fix a segfault when a malloc fails.
6456 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
6457 (dbus_malloc0), (dbus_realloc):
6458 Add support for malloc debugging.
6460 2003-02-15 Alexander Larsson <alexl@redhat.com>
6462 * dbus/dbus-threads.c:
6463 * dbus/dbus-threads.h:
6464 Add condvars. Remove static mutext from API.
6465 Implement static mutexes by initializing them from threads_init.
6467 * glib/dbus-gthread.c:
6468 * qt/dbus-qthread.cpp:
6469 Update with the thread api changes.
6474 Turn StaticMutex into normal mutex + init function.
6475 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
6476 _dbus_list_append_link, _dbus_list_prepend_link
6479 * dbus/dbus-sysdeps.c:
6480 * dbus/dbus-sysdeps.h:
6481 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
6482 _dbus_atomic_dec. Only slow fallback implementation at the moment.
6484 * dbus/dbus-protocol.h:
6485 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
6487 * dbus/dbus-message.c:
6488 Make ref/unref atomic.
6491 * dbus/dbus-connection-internal.h:
6492 * dbus/dbus-connection.c:
6493 * dbus/dbus-connection.h:
6495 Change _peek to _borrow,_return & _steal_borrowed.
6496 Change disconnect callback to event.
6497 Make dbus_connection_dispatch_messages reentrant.
6499 * dbus/dbus-transport.c:
6500 Don't ref the connection on calls to the transport
6503 * dbus/dbus-message-handler.c:
6506 * glib/dbus-gmain.c:
6507 Don't use peek_message anymore
6510 * test/debug-thread.c:
6511 * test/debug-thread.h:
6512 Simple thread implementation that asserts() on deadlocks in
6513 single-threaded code.
6516 (main) Call debug_threads_init.
6519 Use disconnect message instead of disconnect callback.
6523 Don't call dbus_connection_set_disconnect_function. Instead export
6524 bus_connection_disconnect.
6527 Call bus_connection_disconnect when we get a disconnected message.
6529 2003-02-15 Havoc Pennington <hp@pobox.com>
6531 * dbus/dbus-message.c (dbus_message_new): fool around with the
6534 2003-02-14 Havoc Pennington <hp@pobox.com>
6536 * dbus/dbus-mempool.c: fail if the debug functions so indicate
6538 * dbus/dbus-memory.c: fail if the debug functions indicate we
6541 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
6542 (_dbus_decrement_fail_alloc_counter): debug functions to
6543 simulate memory allocation failures
6545 2003-02-14 Havoc Pennington <hp@pobox.com>
6547 * dbus/dbus-errors.h (struct DBusError): add a word of padding
6550 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6552 * bus/driver.c: (bus_driver_handle_hello):
6554 * bus/services.c: (bus_service_lookup):
6555 Reorder message sending so we get a more sane order.
6557 * test/bus-test.c: (message_handler):
6560 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6562 * bus/driver.c: (bus_driver_send_service_deleted),
6563 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6564 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6565 (bus_driver_send_welcome_message),
6566 (bus_driver_handle_list_services),
6567 (bus_driver_handle_acquire_service),
6568 (bus_driver_handle_service_exists):
6569 * dbus/dbus-bus.c: (dbus_bus_register_client),
6570 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6571 * dbus/dbus-errors.c: (dbus_result_to_string):
6572 * dbus/dbus-errors.h:
6573 * dbus/dbus-message.c: (dbus_message_append_args),
6574 (dbus_message_append_args_valist), (dbus_message_get_args),
6575 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
6576 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
6577 (dbus_message_iter_get_byte_array),
6578 (dbus_message_iter_get_string_array), (message_iter_test),
6579 (check_message_handling), (_dbus_message_test):
6580 * dbus/dbus-message.h:
6581 * test/bus-test.c: (main):
6582 Change fields to arguments in messages, so that they won't be
6583 confused with header fields.
6585 * glib/test-dbus-glib.c: (main):
6586 Remove append_fields from hello message.
6588 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6590 * dbus/dbus-errors.c:
6591 * dbus/dbus-message.c:
6592 * dbus/dbus-string.c:
6593 Documentation fixes.
6595 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6597 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
6599 Implement support for timeouts in dbus-glib.
6601 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6603 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6604 * dbus/dbus-message.c: (process_test_subdir):
6605 * test/break-loader.c: (find_breaks_based_on):
6606 Plug some memory leaks.
6608 2003-02-13 Richard Hult <rhult@codefactory.se>
6610 * bus/main.c: Fix build.
6612 * dbus/dbus-errors.h:
6613 * dbus/dbus-errors.c: Fix copyright for Anders.
6615 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6620 * bus/connection.c: (bus_connection_foreach):
6623 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
6624 (unescape_string), (new_section), (parse_section_start),
6625 (parse_key_value), (report_error), (bus_desktop_file_load),
6626 (bus_desktop_file_get_string):
6627 * bus/desktop-file.h:
6628 Use DBusError for error reporting.
6630 * bus/dispatch.c: (send_one_message),
6631 (bus_dispatch_message_handler):
6632 * bus/driver.c: (bus_driver_send_service_deleted),
6633 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6634 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6635 (bus_driver_send_welcome_message),
6636 (bus_driver_handle_list_services),
6637 (bus_driver_handle_acquire_service),
6638 (bus_driver_handle_service_exists):
6639 * bus/loop.c: (bus_loop_run):
6641 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
6643 * bus/utils.c: (bus_wait_for_memory):
6645 New files with general utility functions.
6647 * dbus/dbus-internals.h:
6648 Remove _DBUS_HANDLE_OOM.
6650 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6652 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
6653 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
6654 * dbus/dbus-errors.h:
6655 Add DBusError structure.
6657 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6659 * test/data/valid-messages/standard-acquire-service.message:
6660 * test/data/valid-messages/standard-hello.message:
6661 * test/data/valid-messages/standard-list-services.message:
6662 * test/data/valid-messages/standard-service-exists.message:
6663 Add some standard messages.
6665 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6667 * bus/driver.c: (bus_driver_send_welcome_message),
6668 (bus_driver_handle_list_services),
6669 (bus_driver_handle_acquire_service),
6670 (bus_driver_handle_service_exists), (bus_driver_handle_message):
6671 Update for API changes in libdbus.
6673 * dbus/dbus-message.c: (dbus_message_new_reply):
6674 * dbus/dbus-message.h:
6675 Remove the name argument. The spec states that replies shouldn't
6678 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6680 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
6681 (report_error), (bus_desktop_file_load), (lookup_section),
6682 (lookup_line), (bus_desktop_file_get_raw),
6683 (bus_desktop_file_get_string):
6684 * bus/desktop-file.h:
6685 Some fixes, and new functions for getting a key value from a section.
6687 2003-02-13 Havoc Pennington <hp@pobox.com>
6689 * test/data/auth/fail-after-n-attempts.auth-script: new test
6691 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
6694 2003-02-13 Havoc Pennington <hp@pobox.com>
6696 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
6697 dbus_credentials_match were backward
6699 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
6700 NO_CREDENTIALS and ROOT_CREDENTIALS
6702 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
6703 into here. Never process more commands after we've reached an
6704 end state; store further data as unused bytes.
6706 * test/data/auth/*: add more auth tests
6708 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6709 command to match exact string and EXPECT_UNUSED to match unused
6712 * test/Makefile.am (dist-hook): fix to dist all the test stuff
6714 2003-02-12 Havoc Pennington <hp@pobox.com>
6716 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6717 \r off of popped lines
6719 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6722 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6725 2003-02-12 Havoc Pennington <hp@pobox.com>
6727 * dbus/Makefile.am: remove break-loader from the build, since it
6730 * configure.in: add --enable-gcov to turn on coverage profiling
6731 flags and disable optimization
6733 2003-02-10 Havoc Pennington <hp@pobox.com>
6735 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6736 initial cut at test framework for DBusAuth from laptop.
6737 Doesn't quite work yet but it compiles and I need to get
6738 it off the 266mhz laptop. ;-)
6740 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6741 fix a memleak in error case
6743 2003-02-12 Anders Carlsson <andersca@codefactory.se>
6746 * bus/desktop-file.c:
6747 * bus/desktop-file.h:
6748 Add a desktop file parser.
6750 2003-02-11 Zack Rusin <zack@kde.org>
6752 * qt/message.[h|cpp]: sample implementation
6753 of the KDE wrapper for DBusMessage
6755 2003-02-09 Zack Rusin <zack@kde.org>
6757 * test/bus-test.c: make_it_compile
6758 * doc/dbus-specification.sgml: minimal semantic fix
6760 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6766 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6769 * dbus/dbus-break-loader.c:
6771 * test/break-loader.c:
6772 Move dbus-break-loader to test/ and rename it to break-loader.
6774 2003-02-02 Havoc Pennington <hp@pobox.com>
6776 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6777 for code to manage cookies in your home directory
6779 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6781 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6782 to authenticate, then disconnect the client.
6784 2003-02-03 Alexander Larsson <alexl@redhat.com>
6786 * dbus/dbus-message.c (dbus_message_append_fields):
6789 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6791 * doc/dbus-specification.sgml:
6792 Update address format section.
6794 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6797 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6798 (message_handler), (new_connection_callback), (loop_quit),
6802 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6804 * bus/driver.c: (bus_driver_handle_service_exists):
6805 Simplify the code a bit.
6807 * dbus/dbus-bus.c: (dbus_bus_service_exists):
6810 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6813 Add libdbus-daemon.la and link to it.
6815 2003-02-01 James Willcox <jwillcox@gnome.org>
6817 * bus/driver.c: (bus_driver_handle_own_service):
6818 Actually include the service reply code in the message.
6820 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6822 * bus/driver.c: (bus_driver_handle_service_exists):
6823 Don't unref the incoming message.
6825 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6827 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6829 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6831 * dbus/dbus-server.c: (dbus_server_listen):
6832 * dbus/dbus-transport.c: (_dbus_transport_open):
6833 ifdef out the calls to the debug transport and server.
6835 2003-02-02 Alexander Larsson <alexl@redhat.com>
6837 * dbus/dbus-watch.c (dbus_watch_get_flags):
6838 Add note in the docs that ERROR or HANGUP won't be returned
6839 and are assumed always on.
6841 * glib/dbus-gmain.c (add_watch):
6842 Always add IO_ERR | IO_HUP
6844 * dbus/dbus-message.h:
6845 Add semicolon after dbus_message_iter_get_string_array().
6846 Makes qt code build again
6848 2003-02-01 Anders Carlsson <andersca@codefactory.se>
6850 * bus/driver.c: (create_unique_client_name),
6851 (bus_driver_handle_hello):
6852 Don't take a name, just use a numeric id to identify
6856 * dbus/dbus-bus.c: (dbus_bus_register_client),
6857 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6859 Add new convenience functions for communicating with the bus.
6861 * dbus/dbus-message.h:
6863 * dbus/dbus-protocol.h:
6866 2003-02-01 Alexander Larsson <alexl@redhat.com>
6868 * dbus/dbus-message.c (dbus_message_append_fields):
6869 Add some more doc comments.
6871 2003-02-01 Havoc Pennington <hp@pobox.com>
6873 * dbus/dbus-break-loader.c (randomly_modify_length): change
6874 a 4-byte value in the message as if it were a length
6876 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6877 execute bit on saved files
6879 2003-02-01 Havoc Pennington <hp@pobox.com>
6881 * dbus/dbus-break-loader.c (main): new program to find messages
6882 that break the loader.
6884 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6885 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6887 * dbus/dbus-string.c (_dbus_string_set_byte): new
6889 2003-01-31 Havoc Pennington <hp@pobox.com>
6891 * dbus/dbus-message.c: refactor the test code to be more general,
6892 in preparation for writing a "randomly permute test cases to
6893 try to break the loader" program.
6895 2003-01-31 Havoc Pennington <hp@pobox.com>
6897 * doc/dbus-specification.sgml: work on the specification
6899 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6900 the protocol version of the message.
6902 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6903 no longer specifies that.
6904 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6907 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6908 "break" for DBUS_TYPE_NIL, remove @todo
6910 2003-01-31 Havoc Pennington <hp@pobox.com>
6912 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6913 just set_is_error/get_is_error as this is a commonly-used
6914 function, and write docs.
6916 2003-01-31 Anders Carlsson <andersca@codefactory.se>
6918 * dbus/dbus-address.c: (dbus_address_entry_free):
6919 Free key and value lists.
6921 * dbus/dbus-internals.c: (_dbus_type_to_string):
6922 Add the types we didn't have.
6924 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6925 (_dbus_marshal_validate_arg):
6928 * dbus/dbus-message.c: (dbus_message_set_sender):
6929 Remove todo about being able to set sender to NULL.
6931 (dbus_message_set_is_error_reply),
6932 (dbus_message_get_is_error_reply):
6933 * dbus/dbus-message.h:
6936 * dbus/dbus-protocol.h:
6937 Add error reply flag.
6939 * test/data/valid-messages/opposite-endian.message:
6940 Add NIL type to test.
6942 2003-01-31 Havoc Pennington <hp@pobox.com>
6944 * doc/dbus-specification.sgml: fully specify the header. Add
6945 flags and major protocol version, and change header/body len to
6948 * dbus/dbus-message-builder.c (append_saved_length): append length
6951 * dbus/dbus-message.c (dbus_message_create_header): change header
6952 length and body length to unsigned. Add the new fields from the
6954 (_dbus_message_loader_return_buffer): unsigned header/body len
6956 2003-01-30 Havoc Pennington <hp@pobox.com>
6958 * dbus/dbus-auth.c: rework to use only REJECTED, no
6961 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
6962 use REJECTED, suggested by Mark McLoughlin
6964 2003-01-30 Havoc Pennington <hp@pobox.com>
6966 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
6967 a better way to report errors here. e.g. "unix address lacks
6968 path" or something. also "no such file" when the path doesn't
6971 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
6973 (dbus_parse_address): add @todo about documenting address format,
6974 and allowing , and ; to be escaped
6976 2003-01-30 Anders Carlsson <andersca@codefactory.se>
6979 Add dbus-address.[ch]
6981 * dbus/dbus-address.c: (dbus_address_entry_free),
6982 (dbus_address_entries_free), (create_entry),
6983 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6984 (dbus_parse_address), (_dbus_address_test):
6985 * dbus/dbus-address.h:
6986 New files for dealing with address parsing.
6988 * dbus/dbus-connection.c:
6989 Document timeout functions.
6991 * dbus/dbus-message.c:
6992 Document dbus_message_new_from_message.
6994 * dbus/dbus-server-debug.c:
6997 * dbus/dbus-server.c: (dbus_server_listen):
6998 Parse address and use correct server implementation.
7000 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
7001 * dbus/dbus-string.h:
7002 New function with test.
7004 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
7008 * dbus/dbus-transport-debug.c:
7011 * dbus/dbus-transport.c: (_dbus_transport_open):
7012 Parse address and use correct transport implementation.
7014 2003-01-30 Havoc Pennington <hp@pobox.com>
7016 * dbus/dbus-message.c: use message->byte_order instead of
7017 DBUS_COMPILER_BYTE_ORDER throughout.
7018 (dbus_message_create_header): pad header to align the
7019 start of the body of the message to 8-byte boundary
7021 * dbus/dbus-marshal.h: make all the demarshalers take const
7022 DBusString arguments.
7024 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
7025 validate message args here, so we don't have to do slow validation
7026 later, and so we catch bad messages as they are incoming. Also add
7027 better checks on header_len and body_len. Also fill in
7030 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
7031 implemented properly)
7032 (_dbus_string_validate_nul): new function to check all-nul
7034 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
7035 get_arg_end_pos and remove all validation
7036 (_dbus_marshal_validate_arg): actually do validation here.
7038 2003-01-29 Havoc Pennington <hp@pobox.com>
7040 * dbus/dbus-message.c (check_message_handling): fix assertion
7041 failure on set_client_serial
7043 2003-01-28 Havoc Pennington <hp@pobox.com>
7045 * dbus/dbus-server-debug.c: Add doc section comments
7047 * dbus/dbus-transport-debug.c: add doc section comments
7049 2003-01-28 Havoc Pennington <hp@redhat.com>
7051 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
7052 the reverse order from how I had it
7053 (_dbus_string_base64_encode): reverse encoding order. I was
7054 basically byteswapping everything during encoding.
7056 2003-01-28 Anders Carlsson <andersca@codefactory.se>
7058 * dbus/dbus-connection-internal.h:
7059 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
7060 (_dbus_connection_remove_timeout):
7061 Add functions for adding and removing timeouts.
7063 * dbus/dbus-message.c: (dbus_message_new_from_message):
7064 Add new function that takes a message and creates an exact
7065 copy of it, but with the refcount set to 1.
7066 (check_message_handling):
7069 * dbus/dbus-server-protected.h:
7070 * dbus/dbus-server.c: (_dbus_server_init_base),
7071 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
7072 (dbus_server_set_timeout_functions):
7073 (_dbus_server_remove_timeout):
7074 New functions so that a server can add and remove timeouts.
7076 (dbus_server_listen):
7077 Add commented out call to dbus_server_debug_new.
7079 * dbus/dbus-timeout.c: (_dbus_timeout_new):
7080 Actually set the handler, doh.
7082 * dbus/dbus-transport.c: (_dbus_transport_open):
7083 Add commented out call to dbus_transport_debug_client_new.
7086 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
7088 2003-01-28 Havoc Pennington <hp@pobox.com>
7090 * dbus/dbus-message.c (check_message_handling): function to check
7091 on the loaded message, iterates over it etc.
7093 2003-01-28 Havoc Pennington <hp@pobox.com>
7095 * test/Makefile.am (dist-hook): fix make distdir
7097 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
7099 2003-01-27 Havoc Pennington <hp@pobox.com>
7101 * dbus/dbus-mempool.c (time_for_size): replace printf with
7104 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
7105 empty lines; fix the SAVE_LENGTH stuff to be
7106 START_LENGTH/END_LENGTH so it actually works; couple other
7109 * test/Makefile.am (dist-hook): add dist-hook for .message files
7111 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
7112 can be constant or locked.
7113 (_dbus_string_free): allow freeing a const string as
7116 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
7118 * dbus/dbus-test-main.c (main): take an argument which is the
7119 directory containing test data
7121 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
7122 argument to this and load all the messages in test/data/
7123 checking that they can be loaded or not loaded as appropriate.
7125 2003-01-27 Anders Carlsson <andersca@codefactory.se>
7127 * bus/dispatch.c: (bus_dispatch_message_handler):
7128 Dispatch messages sent to services.
7130 * bus/driver.c: (bus_driver_send_service_deleted),
7131 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7132 (bus_driver_send_service_acquired):
7133 Add helper functions for sending service related messages.
7135 (bus_driver_send_welcome_message):
7136 Send HELLO_REPLY instead of WELCOME.
7138 (bus_driver_handle_list_services):
7139 Send LIST_SERVICES_REPLY instead of SERVICES.
7141 (bus_driver_handle_own_service),
7142 (bus_driver_handle_service_exists):
7143 New message handlers.
7145 (bus_driver_handle_message):
7146 Invoke new message handlers.
7148 (bus_driver_remove_connection):
7149 Don't remove any services here since that's done automatically
7150 by bus_service_remove_owner now.
7153 New function signatures.
7155 * bus/services.c: (bus_service_add_owner):
7156 Send ServiceAcquired message if we're the only primary owner.
7158 (bus_service_remove_owner):
7159 Send ServiceAcquired/ServiceLost messages.
7161 (bus_service_set_prohibit_replacement),
7162 (bus_service_get_prohibit_replacement):
7163 Functions for setting prohibit replacement.
7165 (bus_service_has_owner):
7166 New function that checks if a connection is in the owner queue of
7170 Add new function signatures.
7172 * dbus/dbus-list.c: (_dbus_list_test):
7173 Add tests for _dbus_list_remove_last and traversing the list backwards.
7176 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
7177 go any further, so return NULL then.
7179 * dbus/dbus-protocol.h:
7180 Add new messages, service flags and service replies.
7182 2003-01-26 Havoc Pennington <hp@pobox.com>
7184 * dbus/dbus-message-builder.c: implement, completely untested.
7186 * test/data/*: add data to be used in testing.
7187 ".message" files are our simple loadable text format.
7188 ".message-raw" will be binary dumps of messages.
7190 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
7192 2003-01-26 Havoc Pennington <hp@pobox.com>
7194 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
7196 * dbus/dbus-errors.c (dbus_result_to_string): add
7199 * dbus/dbus-message-builder.c: new file, will contain code to load
7200 up messages from files. Not implemented yet.
7202 2003-01-26 Havoc Pennington <hp@pobox.com>
7204 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
7205 the sender by setting to NULL
7207 2003-01-26 Havoc Pennington <hp@pobox.com>
7209 The unit tests pass, but otherwise untested. If it breaks, the
7210 tests should have been better. ;-)
7212 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
7215 * dbus/dbus-message.c: redo everything so we maintain
7216 message->header as the only copy of the various fields.
7217 This avoids the possibility of out-of-memory in some cases,
7218 for example dbus_message_lock() can't run out of memory anymore,
7219 and avoids extra copying. Figured I may as well go ahead and do
7220 this since it was busted for dbus_message_lock to not return
7221 failure on OOM, and dbus_message_write_header was totally
7222 unchecked for OOM. Also fixed some random other bugs.
7224 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
7225 that strings are nul-terminated. Also, end_pos can be equal
7226 to string length just not greater than, I think.
7227 (_dbus_marshal_set_int32): new function
7228 (_dbus_marshal_set_uint32): new function
7229 (_dbus_marshal_set_string): new function
7231 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
7232 a warning, init timeout_list to NULL
7233 (dbus_connection_send_message): don't use uninitialized variable
7236 * dbus/dbus-string.c (_dbus_string_replace_len): new function
7238 2003-01-26 Anders Carlsson <andersca@codefactory.se>
7240 * bus/driver.c: (bus_driver_handle_hello),
7241 (bus_driver_send_welcome_message):
7244 2003-01-26 Anders Carlsson <andersca@codefactory.se>
7246 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
7247 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7248 (dbus_connection_unref):
7249 * dbus/dbus-marshal.c: (_dbus_marshal_test):
7250 * dbus/dbus-message.c: (dbus_message_unref),
7253 (dbus_message_get_fields):
7254 Remove debugging printout.
7256 (_dbus_message_loader_return_buffer):
7257 Don't store the header string.
7259 (_dbus_message_test):
7262 2003-01-26 Richard Hult <rhult@codefactory.se>
7264 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
7265 the file descriptor list, since it can change under us.
7267 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7269 * glib/dbus-gmain.c: (dbus_connection_prepare),
7270 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
7271 (remove_watch), (dbus_connection_hookup_with_g_main):
7272 Rewrite the glib handling to use its own GSource instead of a
7273 GIOChannel so we can catch messages put in the queue while waiting
7276 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7279 * bus/connection.c: (connection_disconnect_handler),
7280 (connection_watch_callback), (bus_connection_setup):
7281 * bus/dispatch.c: (send_one_message),
7282 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
7283 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
7285 * bus/driver.c: (bus_driver_send_service_deleted),
7286 (bus_driver_send_service_created), (bus_driver_handle_hello),
7287 (bus_driver_send_welcome_message),
7288 (bus_driver_handle_list_services), (bus_driver_remove_connection),
7289 (bus_driver_handle_message):
7291 Refactor code, put the message dispatching in its own file. Use
7292 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
7295 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7297 * dbus/dbus-internals.h:
7298 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
7300 * dbus/dbus-message.c: (dbus_message_get_sender):
7301 * dbus/dbus-message.h:
7302 Implement dbus_message_get_sender.
7304 * dbus/dbus-protocol.h:
7305 Add message and service defines.
7307 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7309 * dbus/dbus-connection.c: (dbus_connection_send_message):
7310 * dbus/dbus-message-internal.h:
7311 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
7312 (dbus_message_write_header):
7313 Remove _dbus_messag_unlock and don't set the client serial on a
7314 message if one already exists.
7316 2003-01-24 Havoc Pennington <hp@pobox.com>
7318 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
7321 * bus/driver.c (bus_driver_handle_list_services): fix a leak
7324 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7326 * dbus/dbus-list.c: (alloc_link), (free_link):
7327 Use a memory pool for the links.
7329 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7331 * bus/connection.c: (bus_connection_foreach):
7333 Add new bus_connection_foreach function.
7335 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
7336 Add function that broadcasts a message to all clients.
7338 (bus_driver_send_service_created), (bus_driver_handle_hello),
7339 (bus_driver_send_welcome_message),
7340 (bus_driver_handle_list_services), (bus_driver_message_handler):
7341 Implement functions that take care of listing services, and notifying
7342 clients when new services are created.
7344 * bus/services.c: (bus_services_list):
7346 Add new function that returns an array of strings with the currently
7347 registered services.
7350 * glib/dbus-gmain.c:
7351 Update copyright year.
7353 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7355 * dbus/dbus-connection.c: (dbus_connection_send_message):
7356 Unlock the message in case it was sent earlier.
7358 (dbus_connection_send_message_with_reply_and_block):
7359 Remove the reply message from the list.
7361 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7362 Set array_len and new_pos correctly.
7364 (_dbus_marshal_test):
7365 Remove debug output.
7367 * dbus/dbus-message-internal.h:
7368 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
7369 New function that returns the reply serial.
7371 (_dbus_message_unlock):
7372 New function that unlocks a message and resets its header.
7374 (dbus_message_append_string_array),
7375 (dbus_message_get_fields_valist),
7376 (dbus_message_iter_get_field_type),
7377 (dbus_message_iter_get_string_array),
7378 (dbus_message_get_fields),
7379 (dbus_message_append_fields_valist):
7380 Handle string arrays.
7382 (dbus_message_set_sender):
7383 Make this function public since the bus daemon needs it.
7385 (decode_header_data):
7386 Set the reply serial to -1 initially.
7388 * dbus/dbus-message.h:
7389 Add dbus_message_set_sender.
7391 2003-01-24 Havoc Pennington <hp@pobox.com>
7393 * doc/dbus-specification.sgml: add some stuff
7395 2003-01-22 Havoc Pennington <hp@pobox.com>
7397 * doc/dbus-specification.sgml: Start to document the protocol.
7399 2003-01-22 Havoc Pennington <hp@pobox.com>
7401 * dbus/dbus-connection.c
7402 (dbus_connection_send_message_with_reply_and_block): add some @todo
7404 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
7406 2003-01-21 Havoc Pennington <hp@pobox.com>
7408 (patch untested because can't compile)
7410 * bus/driver.c (create_unique_client_name): make this function
7411 never recycle client names. Also, caller should initialize
7414 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
7416 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7418 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7419 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7420 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
7421 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
7422 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
7423 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
7424 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
7425 * dbus/dbus-marshal.h:
7426 * dbus/dbus-protocol.h:
7427 Add support for marshalling and demarshalling integer, double
7430 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7435 * bus/connection.c: (connection_disconnect_handler):
7436 Remove the connection from the bus driver's list.
7438 (connection_watch_callback): Dispatch messages.
7440 (free_connection_data): Free connection name.
7442 (bus_connection_setup): Add connection to the bus driver's list.
7443 (bus_connection_remove_owned_service):
7444 (bus_connection_set_name), (bus_connection_get_name):
7445 Add functions for setting and getting the connection's name.
7448 Add function headers.
7450 * bus/driver.c: (create_unique_client_name),
7451 (bus_driver_handle_hello_message),
7452 (bus_driver_send_welcome_message), (bus_driver_message_handler),
7453 (bus_driver_add_connection), (bus_driver_remove_connection):
7456 * bus/services.c: (bus_service_free):
7458 New file that handles communication and registreation with the bus
7461 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7463 * dbus/dbus-connection.c: (dbus_connection_send_message):
7464 Add a new client_serial parameter.
7466 (dbus_connection_send_message_with_reply):
7467 Remove a @todo since we've implemented the blocking function.
7469 (dbus_connection_send_message_with_reply_and_block):
7470 New function that sends a message and waits for a reply and
7471 then returns the reply.
7473 * dbus/dbus-connection.h:
7476 * dbus/dbus-errors.c: (dbus_result_to_string):
7477 * dbus/dbus-errors.h:
7478 Add new DBUS_RESULT.
7480 * dbus/dbus-message-internal.h:
7481 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
7482 (_dbus_message_set_sender), (dbus_message_write_header),
7483 (dbus_message_new_reply), (decode_header_data),
7484 (_dbus_message_loader_return_buffer), (_dbus_message_test):
7485 * dbus/dbus-message.h:
7486 Add new functions that set the reply serial and sender.
7487 Also marshal and demarshal them correctly and add test.
7489 * dbus/dbus-protocol.h:
7490 Add new DBUS_MESSAGE_TYPE_SENDER.
7493 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
7494 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
7495 (dbus_connection_hookup_with_g_main):
7496 * glib/test-dbus-glib.c: (main):
7497 Rewrite to use GIOChannel and remove the GSource crack.
7499 * test/echo-client.c: (main):
7500 * test/watch.c: (check_messages):
7501 Update for changed APIs
7503 2003-01-19 Anders Carlsson <andersca@codefactory.se>
7505 * dbus/Makefile.am: Add dbus-timeout.[cħ]
7507 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
7508 Create a DBusTimeoutList.
7509 (dbus_connection_set_timeout_functions): Add new function to
7510 set timeout callbacks
7512 * dbus/dbus-connection.h: Add public DBusTimeout API.
7514 * dbus/dbus-message.c: (dbus_message_get_service):
7515 * dbus/dbus-message.h: New function.
7517 * dbus/dbus-server.c: Fix small doc typo.
7519 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
7521 2003-01-19 Anders Carlsson <andersca@codefactory.se>
7523 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
7524 of the string, just as long as specified.
7526 2003-01-19 Havoc Pennington <hp@pobox.com>
7528 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
7531 * dbus/dbus-server.c (dbus_server_set_max_connections)
7532 (dbus_server_get_max_connections, dbus_server_get_n_connections):
7533 keep track of current number of connections, and add API for
7534 setting a max (but haven't implemented enforcing the max yet)
7536 2003-01-18 Havoc Pennington <hp@pobox.com>
7538 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
7539 reading/writing if read_watch != NULL or write_watch != NULL.
7541 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
7542 the message loader code to actually load message->header and
7543 message->body into the newly-created message.
7545 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
7548 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
7549 (dbus_connection_get_max_message_size)
7550 (dbus_connection_set_max_live_messages_size)
7551 (dbus_connection_get_max_live_messages_size): implement some
7552 resource limitation functions
7554 * dbus/dbus-resources.c: new file implementing some of the
7555 resource limits stuff
7557 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
7558 missing docs, add @todo to handle OOM etc.
7560 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
7563 2003-01-18 Havoc Pennington <hp@pobox.com>
7565 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
7566 connection if it hasn't been already.
7568 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
7569 replace with DisconnectFunction.
7571 2003-01-18 Havoc Pennington <hp@pobox.com>
7573 Building --disable-verbose-mode --disable-asserts --disable-tests
7574 cuts the library from 112K to 45K or so
7576 * configure.in: check for varargs macro support,
7577 add --enable-verbose-mode, --enable-asserts.
7579 * dbus/dbus-internals.h (_dbus_assert): support
7581 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
7583 2003-01-18 Havoc Pennington <hp@pobox.com>
7585 * dbus/dbus-test.c: include config.h so that tests actually run
7587 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
7588 so the failure mode when that assumption fails will be plenty
7591 2003-01-18 Havoc Pennington <hp@pobox.com>
7593 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
7595 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
7598 * test/Makefile.am: don't use special variable "TESTS" for echo-*
7599 since we don't want to use those in make check
7601 2003-01-15 Havoc Pennington <hp@redhat.com>
7607 2003-01-15 Havoc Pennington <hp@redhat.com>
7609 * test/Makefile.am: fix so that test source code ends up in the
7610 distribution on make distcheck
7612 2003-01-15 Havoc Pennington <hp@redhat.com>
7618 2003-01-15 Havoc Pennington <hp@redhat.com>
7620 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
7621 fix build when --disable-tests
7623 * Makefile.am (EXTRA_DIST): put HACKING in here
7625 * HACKING: document procedure for making a tarball release.
7627 2003-01-14 Anders Carlsson <andersca@codefactory.se>
7629 * bus/connection.c: (connection_error_handler),
7630 (bus_connection_setup):
7631 * bus/main.c: (main):
7632 Make sure that the DBusConnectionData struct is NULLed
7633 out to prevent a segfault.
7635 * dbus/dbus-errors.c: (dbus_result_to_string):
7636 * dbus/dbus-errors.h:
7637 * dbus/dbus-message.c: (dbus_message_get_fields),
7638 (dbus_message_get_fields_valist), (_dbus_message_test):
7639 * dbus/dbus-message.h:
7640 Make dbus_message_get_fields return a result code so we can
7641 track invalid fields as well as oom.
7643 2003-01-11 Havoc Pennington <hp@pobox.com>
7645 * configure.in: change --enable-test/--enable-ansi action-if-given
7646 to enable_foo=$enableval instead of enable_foo=yes
7648 2003-01-08 Havoc Pennington <hp@pobox.com>
7650 * dbus/dbus-string.c (_dbus_string_align_length): new function
7652 * dbus/dbus-test-main.c: move main() for test app here
7654 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
7655 symbol to run tests, because dbus-test isn't in the main
7658 Code review nitpicks.
7660 * dbus/dbus-message.c (dbus_message_write_header): add newlines
7661 for people with narrow emacs ;-). Assert client_serial was filled
7662 in. Assert message->name != NULL.
7663 (dbus_message_append_fields): have "first_field_type" arg separate
7664 from va list, needed for C++ binding that also uses varargs IIRC
7665 and helps with type safety
7666 (dbus_message_new): add @todo about using DBusString to store
7667 service/name internally
7668 (dbus_message_new): don't leak ->service and ->name on OOM later
7670 (dbus_message_unref): free the service name
7671 (dbus_message_get_fields): same change to varargs
7672 i.e. first_field_type
7673 (_dbus_message_loader_return_buffer): assert that the message data
7674 is aligned (if not it's a bug in our code). Put in verbose griping
7675 about why we set corrupted = TRUE.
7676 (decode_header_data): add FIXME that char* is evil. Was going to
7677 add FIXME about evil locale-specific string.h strncmp, but just
7678 switched to wacky string-as-uint32 optimization. Move check for
7679 "no room for field name" above get_const_data_len() to avoid
7680 assertion failure in get_const_data_len if we have trailing 2
7681 bytes or the like. Check for service and name fields being
7682 provided twice. Don't leak service/name on error. Require field
7683 names to be aligned to 4 bytes.
7685 * dbus/dbus-marshal.c: move byte swap stuff to header
7686 (_dbus_pack_int32): uscore-prefix
7687 (_dbus_unpack_int32): uscore-prefix
7688 (_dbus_unpack_uint32): export
7689 (_dbus_demarshal_string): add @todo complaining about use of
7691 (_dbus_marshal_get_field_end_pos): add @todo about bad error
7692 handling allowing corrupt data to go unchecked
7694 2003-01-08 Havoc Pennington <hp@redhat.com>
7696 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
7697 to the select() as needed for authentication. (should be using
7698 _dbus_poll() not select, but for another day)
7700 * dbus/dbus.h: include dbus/dbus-protocol.h
7702 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7704 * dbus/Makefile.am (dbusinclude_HEADERS): Install
7707 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7709 * dbus/dbus-internals.c: (_dbus_type_to_string):
7710 New function that returns a string describing a type.
7712 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7713 * dbus/dbus-marshal.h:
7714 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7715 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7716 (dbus_message_iter_get_byte_array):
7717 * dbus/dbus-message.h:
7718 Add new convenience functions for appending and getting message fields.
7719 Also add demarshalling routines for byte arrays.
7721 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7723 * dbus/dbus-connection-internal.h:
7724 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7725 (_dbus_connection_get_next_client_serial),
7726 (dbus_connection_send_message):
7727 * dbus/dbus-internals.h:
7728 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7729 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7730 (_dbus_marshal_uint32), (_dbus_demarshal_double),
7731 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7732 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7733 (_dbus_verbose_bytes), (_dbus_marshal_test):
7734 * dbus/dbus-marshal.h:
7735 * dbus/dbus-message-internal.h:
7736 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7737 (dbus_message_write_header), (_dbus_message_lock),
7738 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7739 (dbus_message_get_name), (dbus_message_append_int32),
7740 (dbus_message_append_uint32), (dbus_message_append_double),
7741 (dbus_message_append_string), (dbus_message_append_byte_array),
7742 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7743 (dbus_message_iter_unref), (dbus_message_iter_has_next),
7744 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7745 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7746 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7747 (decode_header_data), (_dbus_message_loader_return_buffer),
7748 (message_iter_test), (_dbus_message_test):
7749 * dbus/dbus-message.h:
7750 * dbus/dbus-protocol.h:
7751 * dbus/dbus-test.c: (main):
7753 * glib/test-dbus-glib.c: (message_handler), (main):
7754 * test/echo-client.c: (main):
7755 * test/watch.c: (check_messages):
7756 Make messages sendable and receivable for real.
7758 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7760 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7761 (_dbus_marshal_string), (_dbus_marshal_byte_array):
7762 * dbus/dbus-message.c: (dbus_message_append_int32),
7763 (dbus_message_append_uint32), (dbus_message_append_double),
7764 (dbus_message_append_string), (dbus_message_append_byte_array):
7765 Handle OOM restoration.
7767 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7769 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7770 (_dbus_demarshal_string), (_dbus_marshal_test):
7771 * dbus/dbus-marshal.h:
7772 * dbus/dbus-message.c: (dbus_message_get_name),
7773 Document these functions.
7775 (dbus_message_append_int32), (dbus_message_append_uint32),
7776 (dbus_message_append_double), (dbus_message_append_string),
7777 (dbus_message_append_byte_array):
7778 * dbus/dbus-message.h:
7779 Add functions for adding message fields of different types.
7781 * dbus/dbus-protocol.h:
7782 Add the different types.
7784 2003-01-05 Havoc Pennington <hp@pobox.com>
7786 * bus/connection.c: implement routines for handling connections,
7787 first thing is keeping a list of owned services on each connection
7788 and setting up watches etc.
7790 * bus/services.c: implement a mapping from service names to lists
7793 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7795 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7796 to use static mutexes for global data
7798 * dbus/dbus-connection.c (dbus_connection_set_data): add new
7799 collection of functions to set/get application-specific data
7800 on the DBusConnection.
7802 2003-01-04 Havoc Pennington <hp@pobox.com>
7804 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7805 (_dbus_poll): new function
7807 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7810 * bus/loop.c: initial code for the daemon main loop
7812 2003-01-04 Havoc Pennington <hp@pobox.com>
7814 * test/watch.c (error_handler): make it safe if the error handler
7815 is called multiple times (if we s/error handler/disconnect
7816 handler/ we should just guarantee it's called only once)
7818 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7819 error handler on disconnect (it's quite possible we should
7820 just change the error handler to a "disconnect handler," I'm
7821 not sure we have any other meaningful errors)
7823 * configure.in: check for getpwnam_r
7825 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7826 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7827 mechanism as in SASL spec, using socket credentials
7829 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7830 (_dbus_send_credentials_unix_socket): new function
7832 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7834 (_dbus_write): only check errno if <0 returned
7835 (_dbus_write_two): ditto
7837 2003-01-02 Anders Carlsson <andersca@codefactory.se>
7839 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7840 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7841 (_dbus_marshal_test):
7842 * dbus/dbus-marshal.h:
7843 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7844 to _dbus_marshal_utf8_string. Also fix some tests.
7846 2002-12-28 Harri Porten <porten@kde.org>
7848 * configure.in: added check for C++ compiler and a very cheesy
7849 check for the Qt integration
7851 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7853 * qt/Makefile.am: added
7855 * qt/.cvsignore: added
7857 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7858 latter, added #ifdef QT_THREAD_SUPPORT guard.
7860 * dbus/Makefile.am: added missing headers for make dist
7862 2002-12-28 Kristian Rietveld <kris@gtk.org>
7864 * dbus/Makefile.am: fixup export-symbols-regex.
7866 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7868 * acinclude.m4: Add this file and put the
7869 PKG_CHECK_MODULE macro in it.
7871 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7873 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7874 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7875 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7876 (_dbus_marshal_test):
7877 Make the demarshalling routines align the pos argument.
7878 Add string marshalling tests and fix the obvious bugs
7881 2002-12-26 Havoc Pennington <hp@pobox.com>
7883 * dbus/dbus-auth.c: fixes fixes fixes
7885 * dbus/dbus-transport-unix.c: wire up support for
7886 encoding/decoding data on the wire
7888 * dbus/dbus-auth.c (_dbus_auth_encode_data)
7889 (_dbus_auth_decode_data): append to target string
7890 instead of nuking it.
7892 2002-12-26 Havoc Pennington <hp@pobox.com>
7894 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7895 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7898 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7899 avoid swap_bytes() overhead (ignoring possible assembly stuff for
7900 now). Main point is because I wanted unpack_uint32 to implement
7902 (_dbus_verbose_bytes): new function
7904 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7906 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7907 mechanism to handle a corrupt message stream
7908 (_dbus_message_loader_new): fix preallocation to only prealloc,
7911 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7912 (_dbus_string_test): enhance tests for copy/move and fix the
7915 * dbus/dbus-transport-unix.c: Hold references in more places to
7916 avoid reentrancy problems
7918 * dbus/dbus-transport.c: ditto
7920 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7921 leak reference count in no-message case
7923 * test/watch.c (do_mainloop): handle adding/removing watches
7924 during iteration over the watches. Also, ref the connection/server
7925 stored on a watch, so we don't try to mangle a destroyed one.
7927 * dbus/dbus-transport-unix.c (do_authentication): perform
7930 * dbus/dbus-auth.c (get_state): add a state
7931 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7932 (_dbus_auth_get_unused_bytes): append the unused bytes
7933 to the passed in string, rather than prepend
7935 * dbus/dbus-transport.c (_dbus_transport_init_base): create
7936 the auth conversation DBusAuth
7938 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7939 (_dbus_transport_new_for_domain_socket): when creating a
7940 transport, pass in whether it's a client-side or server-side
7941 transport so we know which DBusAuth to create
7943 2002-12-03 Havoc Pennington <hp@pobox.com>
7945 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7946 _after_ finalizing the derived members
7947 (unix_connection_set): unref watch if we fail to add it
7949 * dbus/dbus-connection.c (dbus_connection_unref): delete the
7950 transport first, so that the connection owned by the
7951 transport will be valid as the transport finalizes.
7953 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
7954 if necessary, and remove watches from the connection.
7956 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
7958 2002-12-26 Anders Carlsson <andersca@codefactory.se>
7960 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7961 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7962 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7963 (_dbus_marshal_test):
7964 * dbus/dbus-marshal.h:
7965 Add string marshal functions and have the demarshal functions
7966 return the new position.
7968 2002-12-25 Havoc Pennington <hp@pobox.com>
7970 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
7971 it is a simple protocol that just maps directly to SASL.
7973 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7974 initial implementation, not actually used yet.
7976 * dbus/dbus-string.c (_dbus_string_find): new function
7977 (_dbus_string_equal): new function
7978 (_dbus_string_base64_encode): new function
7979 (_dbus_string_base64_decode): new function
7981 2002-12-25 Anders Carlsson <andersca@codefactory.se>
7984 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7985 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7986 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7987 (_dbus_demarshal_uint32), (_dbus_marshal_test):
7988 * dbus/dbus-marshal.h:
7989 * dbus/dbus-protocol.h:
7990 * dbus/dbus-test.c: (main):
7992 Add un-optimized marshalling/demarshalling routines.
7994 2002-12-25 Harri Porten <porten@kde.org>
7996 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7998 2002-12-24 Zack Rusin <zack@kde.org>
8000 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
8001 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
8004 2002-12-24 Havoc Pennington <hp@pobox.com>
8006 * glib/dbus-gthread.c: fix include
8008 * glib/dbus-glib.h: rename DBusMessageHandler for now.
8009 I think glib API needs to change, though, as you don't
8010 want to use DBusMessageFunction, you want to use the
8011 DBusMessageHandler object. Probably
8012 dbus_connection_open_with_g_main_loop()
8013 and dbus_connection_setup_g_main_loop() or something like that
8014 (but think of better names...) that just create a connection
8015 that has watch/timeout functions etc. already set up.
8017 * dbus/dbus-connection.c
8018 (dbus_connection_send_message_with_reply): new function just to
8019 show how the message handler helps us deal with replies.
8021 * dbus/dbus-list.c (_dbus_list_remove_last): new function
8023 * dbus/dbus-string.c (_dbus_string_test): free a string that
8026 * dbus/dbus-hash.c: use memory pools for the hash entries
8027 (rebuild_table): be more paranoid about overflow, and
8028 shrink table when we can
8029 (_dbus_hash_test): reduce number of sprintfs and write
8030 valid C89. Add tests for case where we grow and then
8031 shrink the hash table.
8033 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
8035 * dbus/dbus-connection.c (dbus_connection_register_handler)
8036 (dbus_connection_unregister_handler): new functions
8038 * dbus/dbus-message.c (dbus_message_get_name): new
8040 * dbus/dbus-list.c: fix docs typo
8042 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
8043 an object representing a handler for messages.
8045 2002-12-16 Anders Carlsson <andersca@codefactory.se>
8048 * glib/dbus-gthread.c: (dbus_gthread_init):
8049 Don't use the gdbus prefix for public functions.
8051 2002-12-16 Anders Carlsson <andersca@codefactory.se>
8055 Add GLib checks and fixup .pc files
8059 * glib/dbus-gmain.c: (gdbus_connection_prepare),
8060 (gdbus_connection_check), (gdbus_connection_dispatch),
8061 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
8062 (dbus_connection_gsource_new):
8063 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
8064 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
8065 * glib/test-dbus-glib.c: (message_handler), (main):
8068 2002-12-15 Harri Porten <porten@kde.org>
8070 * autogen.sh: check for libtoolize before attempting to use it
8072 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
8075 * .cvsignore: ignore more stamp files
8077 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
8079 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
8080 without make install.
8082 2002-12-15 Havoc Pennington <hp@pobox.com>
8084 * dbus/dbus-threads.c: add thread stubs that a higher library
8085 layer can fill in. e.g. the GLib wrapper might fill them in with
8086 GThread stuff. We still need to use this thread API to
8087 thread-safe-ize the library.
8089 2002-12-12 Havoc Pennington <hp@pobox.com>
8091 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
8092 below new interfaces and include fewer system headers.
8094 * dbus/dbus-sysdeps.c (_dbus_read): new function
8095 (_dbus_write): new function
8096 (_dbus_write_two): new function
8097 (_dbus_connect_unix_socket): new function
8098 (_dbus_listen_unix_socket): new function
8100 * dbus/dbus-message-internal.h: change interfaces to use
8103 2002-12-11 Havoc Pennington <hp@pobox.com>
8105 * dbus/dbus-types.h: add dbus_unichar
8107 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
8109 * dbus/dbus-connection.c (dbus_connection_send_message): return
8112 * dbus/dbus-transport.c: include dbus-watch.h
8114 * dbus/dbus-connection.c: include dbus-message-internal.h
8116 * HACKING: add file with coding guidelines stuff.
8118 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
8119 handling here, for security purposes (as in vsftpd). Not actually
8120 using this class yet.
8122 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
8123 system/libc usage here, as in vsftpd, for ease of auditing (and
8124 should also simplify portability). Haven't actually moved all the
8125 system/libc usage into here yet.
8127 2002-11-25 Havoc Pennington <hp@pobox.com>
8129 * dbus/dbus-internals.c (_dbus_verbose): fix to not
8130 always print the first verbose message.
8132 2002-11-24 Havoc Pennington <hp@pobox.com>
8134 * test/echo-client.c, test/echo-server.c: cheesy test
8137 * configure.in (AC_CHECK_FUNCS): check for writev
8139 * dbus/dbus-message.c (_dbus_message_get_network_data): new
8142 * dbus/dbus-list.c (_dbus_list_foreach): new function
8144 * dbus/dbus-internals.c (_dbus_verbose): new function
8146 * dbus/dbus-server.c, dbus/dbus-server.h: public object
8147 representing a server that listens for connections.
8149 * dbus/.cvsignore: create
8151 * dbus/dbus-errors.h, dbus/dbus-errors.c:
8152 public API for reporting errors
8154 * dbus/dbus-connection.h, dbus/dbus-connection.c:
8155 public object representing a connection that
8156 sends/receives messages. (Same object used for
8157 both client and server.)
8159 * dbus/dbus-transport.h, dbus/dbus-transport.c:
8160 Basic abstraction for different kinds of stream
8161 that we might read/write messages from.
8163 2002-11-23 Havoc Pennington <hp@pobox.com>
8165 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
8168 * dbus/dbus-test.c (main): add list test, and include
8169 dbus-test.h as intended
8171 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
8172 (_dbus_hash_table_remove_int): return value indicates
8173 whether the entry existed to remove
8175 * dbus/dbus-list.c: add linked list utility class,
8178 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
8181 2002-11-23 Havoc Pennington <hp@pobox.com>
8183 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
8184 DBUS_END_DECLS to nothing, that should fix this once and for all
8186 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
8188 * dbus/dbus-message.c, dbus/dbus-hash.c:
8189 add some missing @brief
8191 2002-11-23 Havoc Pennington <hp@pobox.com>
8193 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
8194 to avoid confusing Doxygen
8196 * dbus/dbus-hash.c: @} not }@
8198 * dbus/dbus-message.c (struct DBusMessage): split out
8201 2002-11-23 Havoc Pennington <hp@pobox.com>
8203 * configure.in: pile on more warning flags if using gcc
8205 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
8206 to document static functions
8208 * configure.in: add summary to end of configure so it
8209 looks nice and attractive
8211 * dbus/dbus-hash.c: finish implementation and write unit
8214 * configure.in: add --enable-tests to enable unit tests
8216 * dbus/dbus-test.c: test program to run unit tests
8217 for all files in dbus/*, initially runs a test for
8220 * dbus/dbus-internals.h: file to hold some internal utility stuff
8222 2002-11-22 Havoc Pennington <hp@redhat.com>
8224 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
8225 "ported" away from Tcl
8227 * dbus/dbus-types.h: header for types such as dbus_bool_t
8229 2002-11-22 Havoc Pennington <hp@redhat.com>
8231 * dbus/dbus.h: fixups for doc warnings
8233 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
8235 (QUIET): make it quiet so we can see warnings
8237 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
8239 2002-11-22 Havoc Pennington <hp@redhat.com>
8241 * Makefile.am: include "Doxyfile" target in all-local
8243 * configure.in: generate the Doxyfile
8245 * Doxyfile.in: move Doxyfile here, so we can use
8246 configure to generate a Doxyfile with the right
8249 2002-11-22 Havoc Pennington <hp@redhat.com>
8251 * dbus/dbus-message.c: move inline docs into .c file
8253 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
8254 so all docs are under doc/
8255 (MAN_EXTENSION): generate man pages. Use extension
8256 ".3dbus" which matches ".3qt" on my system,
8257 I guess this is OK, I don't know really.
8258 (FILE_PATTERNS): look for .c files not .h, makes sense
8261 2002-11-22 Havoc Pennington <hp@pobox.com>
8263 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
8264 because any app can be a server, and any app can be a client,
8265 the bus is a special kind of server.
8267 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
8269 * Doxyfile : adding. Still needs Makefile rules to be generated
8270 automatically (just run "doxygen" in the toplevel dir for now to
8273 * dbus/dbus-message.h : Adding sample docs (javadoc since
8274 resembles gtk-doc a little more)
8276 * dbus/dbus.h : Adding sample docs
8278 2002-11-21 Havoc Pennington <hp@redhat.com>
8280 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
8281 so we can allow ourselves to include files directly,
8282 instead of having to use dbus.h
8284 * dbus/dbus.h: fill in
8286 * dbus/dbus-message.h: sketch out a sample header file.
8287 Include griping if you include it directly instead of
8290 * dbus/dbus-macros.h: new file with macros for extern "C",
8291 TRUE/FALSE, NULL, etc.
8293 * doc/file-boilerplate.c: put include guards in here
8295 2002-11-21 Havoc Pennington <hp@redhat.com>
8297 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
8299 * COPYING: include the GPL as well, and license code
8300 under both AFL and GPL.
8302 2002-11-21 Havoc Pennington <hp@redhat.com>
8304 * acconfig.h: get rid of this
8306 * autogen.sh (run_configure): add --no-configure option
8308 * configure.in: remove AC_ARG_PROGRAM to make
8309 autoconf complain less. add AC_PREREQ.
8310 add AC_DEFINE third arg.
8312 2002-11-21 Anders Carlsson <andersca@codefactory.se>
8315 Fix references so we can distcheck.
8317 2002-11-21 Havoc Pennington <hp@redhat.com>
8319 * Initial module creation