--- a/loudmouth/lm-connection.c Mon Aug 30 21:37:04 2004 +0000
+++ b/loudmouth/lm-connection.c Thu Sep 02 18:17:01 2004 +0000
@@ -1659,15 +1659,13 @@
* @connection: an #LmConnection
* @proxy: an #LmProxy
*
- * Sets the proxy to use for this connection. To unset pass a proxy of type
- * #LM_PROXY_TYPE_NONE to this function.
+ * Sets the proxy to use for this connection. To unset pass #NULL.
*
**/
void
lm_connection_set_proxy (LmConnection *connection, LmProxy *proxy)
{
g_return_if_fail (connection != NULL);
- g_return_if_fail (proxy != NULL);
if (lm_connection_is_open (connection)) {
g_warning ("Can't change server proxy while connected");
@@ -1679,7 +1677,7 @@
connection->proxy = NULL;
}
- if (lm_proxy_get_type (proxy) != LM_PROXY_TYPE_NONE) {
+ if (proxy && lm_proxy_get_type (proxy) != LM_PROXY_TYPE_NONE) {
connection->proxy = lm_proxy_ref (proxy);
}
}