summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2006-10-28 01:50:08 +0000
committerHavoc Pennington <hp@redhat.com>2006-10-28 01:50:08 +0000
commitabfdfb2dfb2f2f0317856083dcf6ca71b271c9b9 (patch)
tree2af2a2185c82f5427773601a0f60bb38f97fcf8c
parenteaefe03a8891b84e3f9e1f99f9098d65567e3092 (diff)
2006-10-27 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c (dbus_connection_open_private): document how to choose shared vs. private connections
-rw-r--r--ChangeLog5
-rw-r--r--dbus/dbus-connection.c12
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f0d4d89f..7e5458b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
2006-10-27 Havoc Pennington <hp@redhat.com>
+
+ * dbus/dbus-connection.c (dbus_connection_open_private): document
+ how to choose shared vs. private connections
+
+2006-10-27 Havoc Pennington <hp@redhat.com>
* dbus/dbus-test.c: enclose more of the file in the
DBUS_BUILD_TESTS check.
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index db625588..552ecfd8 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -2381,6 +2381,11 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending)
* Because this connection is shared, no user of the connection
* may call dbus_connection_close(). However, when you are done with the
* connection you should call dbus_connection_unref().
+ *
+ * @note Prefer dbus_connection_open() to dbus_connection_open_private()
+ * unless you have good reason; connections are expensive enough
+ * that it's wasteful to create lots of connections to the same
+ * server.
*
* @param address the address.
* @param error address where an error can be returned.
@@ -2419,7 +2424,12 @@ dbus_connection_open (const char *address,
* (The dbus_connection_close() can be skipped if the
* connection is already known to be disconnected, for example
* if you are inside a handler for the Disconnected signal.)
- *
+ *
+ * @note Prefer dbus_connection_open() to dbus_connection_open_private()
+ * unless you have good reason; connections are expensive enough
+ * that it's wasteful to create lots of connections to the same
+ * server.
+ *
* @param address the address.
* @param error address where an error can be returned.
* @returns new connection, or #NULL on failure.