dbus/dbus dbus-connection.c,1.151,1.152

Havoc Pennington hp at kemper.freedesktop.org
Fri Oct 27 18:50:10 PDT 2006


Update of /cvs/dbus/dbus/dbus
In directory kemper:/tmp/cvs-serv10023/dbus

Modified Files:
	dbus-connection.c 
Log Message:
2006-10-27  Havoc Pennington  <hp at redhat.com>
	
	* dbus/dbus-connection.c (dbus_connection_open_private): document
	how to choose shared vs. private connections



Index: dbus-connection.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -d -r1.151 -r1.152
--- dbus-connection.c	28 Oct 2006 01:41:37 -0000	1.151
+++ dbus-connection.c	28 Oct 2006 01:50:08 -0000	1.152
@@ -2381,6 +2381,11 @@
  * 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 @@
  * (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.



More information about the dbus-commit mailing list