History log of /external/dbus/dbus/dbus-mempool.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4299eb3c0907100fe95d2986984b48d40cc52841 08-Jul-2015 Daniel Erat <derat@google.com> Incorporate upstream changes to v1.6.8.

Squash upstream commits up to and including the v1.6.8
release (upstream commit 1cad15cc).

This repository's changes from upstream are now limited to:

- addition of Android.mk, CleanSpec.mk, config.h, and NOTICE
files
- addition of dbus/dbus-arch-deps.h and removal from
dbus/.gitignore (ebae2d21, f022f55d)
- WANT_PIDFILE #ifdefs added to bus/bus.c to disable writing
dbus-daemon's PID to a file (3100d06a)
- TRACE_LOCKS set to 0 in dbus/dbus-connection.c (88a0ffe5)
- DBUS_ANDROID_LOG added to dbus/dbus-internals.c to use
logcat (7de15def)
- ANDROID_MANAGED_SOCKET added to dbus/dbus-sysdeps-unix.c
to use an SELinux-managed socket rather than a
dbus-daemon-created Unix domain socket (3100d06a)

Bug: 22328216
Change-Id: I793ebdf963d9b0740f0da28f1de593d088f08406
/external/dbus/dbus/dbus-mempool.c
dbecdeabb20e0ce11121819c63373f0afba57c58 19-Mar-2010 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Consistently include <config.h> in all C source files and never in header files.
/external/dbus/dbus/dbus-mempool.c
5baf2f856a9c6625993234855b07680da1c8916f 11-Jul-2009 Tobias Mueller <fdo-bugs@cryptobitch.de> Bug 21161 - Update the FSF address

No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-mempool.c
d012387afef0ba02185ebe27bc6bb15551912e92 14-Jul-2007 Havoc Pennington <hp@redhat.com> 2007-07-13 Havoc Pennington <hp@redhat.com>

* Add indent-tabs-mode: nil to all file headers.
/external/dbus/dbus/dbus-mempool.c
43605a6f4e78a8c28afb4b1e924dff0301e0e95c 10-Aug-2004 Havoc Pennington <hp@redhat.com> 2004-08-09 Havoc Pennington <hp@redhat.com>

* COPYING: switch to Academic Free License version 2.1 instead of
2.0, to resolve complaints about patent termination clause.
/external/dbus/dbus/dbus-mempool.c
a1df3040f29223eddaa3ace0fe018fcb28cddcd9 02-Dec-2003 Richard Hult <richard@imendio.com> 2003-12-02 Richard Hult <richard@imendio.com>

* Update AFL version to 2.0 throughout the source files to reflect
the update that was done a while ago.
/external/dbus/dbus/dbus-mempool.c
27b694f6e109c78c633ddb8d96f524e46e536f4e 09-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-08 Havoc Pennington <hp@pobox.com>

* dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
data from getting written, and there wasn't a good reason to
use _exit really.

* test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
dbus_verbose lines in test coverage
(main): add list of functions sorted by # of untested blocks
to the coverage report

* dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS

* dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage

* dbus/dbus-message-handler.c (_dbus_message_handler_test):
extend test coverage

* test/data/auth/cancel.auth-script: test canceling an
authentication

* dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
aren't used. in CVS history if we end up needing them.
/external/dbus/dbus/dbus-mempool.c
bc86794f23fa538a405813fb61b531c2eacc9ae1 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-30 Havoc Pennington <hp@pobox.com>

* bus/config-parser.c: hacking

* dbus/dbus-memory.c: don't use DBusList for the list of stuff
to shut down, since it could cause weirdness with the DBusList
lock

* dbus/dbus-list.c (_dbus_list_test): add tests for the
link-oriented stack routines
(alloc_link): free the mempool if the first alloc from it fails

* dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue

* dbus/dbus-string.c (UNICODE_VALID): sync new version of this
from GLib
(_dbus_string_skip_white): new

* doc/config-file.txt (Elements): add <includedir>
/external/dbus/dbus/dbus-mempool.c
ebb57e719c32becd95a1efe3dd269c21e5a011b6 16-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
this. always run the test suite before commit...

* bus/*: adapt to DBusConnection API changes

* glib/dbus-gmain.c: adapt to DBusConnection API changes,
requires renaming stuff to avoid dbus_connection_dispatch name
conflict.

* dbus/dbus-transport.c (_dbus_transport_queue_messages): new
function

* dbus/dbus-message.c (_dbus_message_loader_queue_messages):
separate from _dbus_message_loader_return_buffer()

* dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
this, because it's now always broken to use; the number of
messages in queue vs. the number still buffered by the message
loader is undefined/meaningless. Should use
dbus_connection_get_dispatch_state().
(dbus_connection_dispatch): rename from
dbus_connection_dispatch_message
/external/dbus/dbus/dbus-mempool.c
ce173b29fc1e9432cb5956952afdbe775da12415 16-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

Oops - test code was only testing failure of around 30 of the
mallocs in the test path, but it turns out there are 500+
mallocs. I believe this was due to misguided linking setup such
that there was one copy of dbus_malloc etc. in the daemon and one
in the shared lib, and only daemon mallocs were tested. In any
case, the test case now tests all 500+ mallocs, and doesn't pass
yet, though there are lots of fixes in this patch.

* dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
this so that it doesn't need to allocate memory, since it
has no way of indicating failure due to OOM (and would be
annoying if it did).

* dbus/dbus-list.c (_dbus_list_pop_first_link): new function

* bus/Makefile.am: rearrange to create two self-contained
libraries, to avoid having libraries with overlapping symbols.
that was resulting in weirdness, e.g. I'm pretty sure there
were two copies of global static variables.

* dbus/dbus-internals.c: move the malloc debug stuff to
dbus-memory.c

* dbus/dbus-list.c (free_link): free list mempool if it becomes
empty.

* dbus/dbus-memory.c (_dbus_disable_mem_pools): new function

* dbus/dbus-address.c (dbus_parse_address): free list nodes
on failure.

* bus/dispatch.c (bus_dispatch_add_connection): free
message_handler_slot when no longer using it, so
memory leak checkers are happy for the test suite.

* dbus/dbus-server-debug-pipe.c (debug_finalize): free server name

* bus/bus.c (new_connection_callback): disconnect in here if
bus_connections_setup_connection fails.

* bus/connection.c (bus_connections_unref): fix to free the
connections
(bus_connections_setup_connection): if this fails, don't
disconnect the connection, just be sure there are no side
effects.

* dbus/dbus-string.c (undo_alignment): unbreak this

* dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
leaking
(_dbus_auth_new): fix the order in which we free strings
on OOM failure

* bus/connection.c (bus_connection_disconnected): fix to
not send ServiceDeleted multiple times in case of memory
allocation failure

* dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
get the base service name
(dbus_bus_register_client): don't return base service name,
instead store it on the DBusConnection and have an accessor
function for it.
(dbus_bus_register_client): rename dbus_bus_register()

* bus/dispatch.c (check_hello_message): verify that other
connections on the bus also got the correct results, not
just the one sending hello
/external/dbus/dbus/dbus-mempool.c
f05f87a825ab8ed5273674a7f65521ffc526f0d2 15-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-15 Havoc Pennington <hp@pobox.com>

* bus/dispatch.c (bus_dispatch_test): OK, now finally actually
write useful test code, after all that futzing around ;-)

Test does not yet pass because we can't handle OOM in
_dbus_transport_messages_pending (basically,
dbus_connection_preallocate_send() does not prealloc the write
watch). To fix this, I think we need to add new stuff to
set_watch_functions, namely a SetEnabled function so we can alloc
the watch earlier, then enable it later.

* dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
dbus-memory.c to the convenience lib

* bus/test.c: rename some static functions to keep them clearly
distinct from stuff in connection.c. Handle client disconnection.
/external/dbus/dbus/dbus-mempool.c
bc1d2b04e5af52a95c7c6b4181f05d082d079df5 21-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-21 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
element size at least 8 bytes, fixes mempool tests on
64-bit machines.
/external/dbus/dbus/dbus-mempool.c
89ee9e6abf40b594c681479dfc4d18d892c93838 19-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-19 Anders Carlsson <andersca@codefactory.se>

* configure.in:
Add check for nonposix getpwnam_r

* dbus/dbus-mempool.c: (_dbus_mem_pool_new):
Align the pool element size to a sizeof (void *) boundary.

* dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
(_dbus_listen_unix_socket), (_dbus_credentials_from_username):
General Solaris fixes.

* test/data/valid-messages/simplest-manual.message:
Explicitly state that we want little-endian packing.
/external/dbus/dbus/dbus-mempool.c
07a795f1db3b09beeec647643a4f263f617bc371 14-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-14 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mempool.c: fail if the debug functions so indicate

* dbus/dbus-memory.c: fail if the debug functions indicate we
should

* dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
(_dbus_decrement_fail_alloc_counter): debug functions to
simulate memory allocation failures
/external/dbus/dbus/dbus-mempool.c
05a4ad6994919b352b5229d0b1b0a8ebebe2a42f 28-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-27 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mempool.c (time_for_size): replace printf with
_dbus_verbose

* dbus/dbus-message-builder.c (_dbus_message_data_load): allow
empty lines; fix the SAVE_LENGTH stuff to be
START_LENGTH/END_LENGTH so it actually works; couple other
bugfixes

* test/Makefile.am (dist-hook): add dist-hook for .message files

* dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
can be constant or locked.
(_dbus_string_free): allow freeing a const string as
documented/intended

* dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility

* dbus/dbus-test-main.c (main): take an argument which is the
directory containing test data

* dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
argument to this and load all the messages in test/data/
checking that they can be loaded or not loaded as appropriate.
/external/dbus/dbus/dbus-mempool.c
17fbe2b702cdc880abd6cbe117e620b6432f42e0 24-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-24 Havoc Pennington <hp@pobox.com>

* glib/dbus-gthread.c: fix include

* glib/dbus-glib.h: rename DBusMessageHandler for now.
I think glib API needs to change, though, as you don't
want to use DBusMessageFunction, you want to use the
DBusMessageHandler object. Probably
dbus_connection_open_with_g_main_loop()
and dbus_connection_setup_g_main_loop() or something like that
(but think of better names...) that just create a connection
that has watch/timeout functions etc. already set up.

* dbus/dbus-connection.c
(dbus_connection_send_message_with_reply): new function just to
show how the message handler helps us deal with replies.

* dbus/dbus-list.c (_dbus_list_remove_last): new function

* dbus/dbus-string.c (_dbus_string_test): free a string that
wasn't

* dbus/dbus-hash.c: use memory pools for the hash entries
(rebuild_table): be more paranoid about overflow, and
shrink table when we can
(_dbus_hash_test): reduce number of sprintfs and write
valid C89. Add tests for case where we grow and then
shrink the hash table.

* dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools

* dbus/dbus-connection.c (dbus_connection_register_handler)
(dbus_connection_unregister_handler): new functions

* dbus/dbus-message.c (dbus_message_get_name): new

* dbus/dbus-list.c: fix docs typo

* dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
an object representing a handler for messages.
/external/dbus/dbus/dbus-mempool.c